MATLAB: How to perform extreme value distribution in Matlab

statistics

%Water level observations
WL=[ 6.79 6.89 6.38 5.67 6.91 7.66 6.41 6.04 6.41 5.55 6.93 5.67 6.69 6.51 6.32 7.33 6.43 6.52 6.13 6.72 6.7 7.78 6.18 5.41 6.94 6.51 6.02 5.94 6.08 ];
Now i want to apply gumble distribution for that data which will give me several return period values(50,100,150) along with the probability plot(confidence limit line should be visible on the plot). Gumbel distribution of same data gave 8.27 for 100 year return period with another software whereas matlab gives 8.54 for same return period.In that case i use the following coding,
WL= [ 6.79 6.89 6.38 5.67 6.91 7.66 6.41 6.04 6.41 5.55 6.93 5.67 6.69 6.51 6.32 7.33 6.43 6.52 6.13 6.72 6.7 7.78 6.18 5.41 6.94 6.51 6.02 5.94 6.08 ];
p = fitdist(-WL','ev')
p = extreme value distribution
mu = -6.19143
sigma = 0.512164
val100yr=-evinv(0.01,-6.19143,0.512164)
val100yr = 8.5475
Is there any error here? why this difference? pls help me out

Best Answer

Hard to say without looking at the i) the formulas, ii) how the formulas are implemented in the code. It could be numerical precision, but it is very difficult to be sure without looking at the implementations. Another alternative is that you are not using the necessary precision when feeding data to evinv(). You could try:
evinv(0.01,mu,sigma)
instead of typing in numerical values, and if that solves the problem, then you should be aware that the value displayed in the screen is usually different from the internal representation (what is stored in memory).
What is "another sofware"?