Demo entry 6660799

assignment

   

Submitted by anonymous on Nov 16, 2017 at 15:37
Language: Matlab. Code size: 1.8 kB.

load('C:\Users\Shunan\OneDrive - Uppsala universitet\UU\Statistics\lab\EX1\lab1.mat')
histfit(Flow,15,'gamma')
legend('Frequency','Gamma Distribution fit ')
ylabel('Frequency')
xlabel('Discharge Measurements (m^3·s^-^1)')
hold on
line([217,217],[0,200],'Linestyle','--','color','m')

 boxplot(Flow)
ylabel('Discharge Measurements (m^3·s^-^1)')
%title('Monthly Mean Water Discharge Measurements (1951-2000)')
grid
hold on 
line([-3,3],[217,217],'Linestyle','--','color','m')
legend


Max = max(Flow);
Mean = nanmean(Flow);
Min = nanmin(Flow);
Median = nanmedian(Flow);
Mode = mode(Flow);
StandardDeviation = nanstd(Flow);
Variance = nanvar(Flow);

cdfplot(Flow)
xlabel('Discharge (m^3·s^-^1)')
ylabel('Cumulative Probability Density')
title('Cumulative Probability Density of Flow Data')
 line([97.1,97.1],[0,0.1502],'color','k')
 line([114,114],[0,0.2591],'color','k')
 line([357,357],[0,0.8515],'color','k')
 line([551,551],[0,0.9505],'color','k')
 line([1030,1030],[0,1],'color','k')

 histogram(Flow,'Normalization','count')
 
 [f,xi]=ksdensity(Flow);
plot(xi,f)
hold on
histogram(Flow)
hold on
plot(xi,f)
yyaxis left
plot(xi,f)
yyaxis right
histogram(Flow)



exceed = (Flow>= 551);
Lamadar = (sum(exceed)/612*120)
  Poison = (((Lamadar)^2)*(exp(-Lamadar)))/factorial(2)
  
  
  
  d = reshape(FlowCopy,[],10);
  vd = nanvar(d);
  vdadd = nanvar(year5);
  vd (:,11) = vdadd;
  plot(vd)
 xticklabels({'1950-1954','1955-1959','1960-1964','1965-1969','1970-1974','1975-1979','1980-1984','1985-1989','1990-1994','1995-1999','2000'})
  xlabel('period')
  ylabel('variance')
  
  plot(FlowData(:,3),FlowData(:,4))
  xlabel('year')
  ylabel('Discharge Measurements (m^3·s^-^1)')
  hold on
 line([1950,551],[2000.91666666667,551])
 

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).