www.gusucode.com > stats 源码程序 matlab案例代码 > stats/TestforanExtremeValueDistributionExample.m

    %% Anderson-Darling Test for Extreme Value Distribution  

%% 
% Load the sample data. Create a vector containing the first column of the
% students' exam grades data. 
load examgrades
x = grades(:,1);  

%% 
% Test the null hypothesis that the exam grades come from an extreme value
% distribution. You do not need to specify values for the population parameters. 
[h,p] = adtest(x,'Distribution','ev') 

%%
% The returned value of |h = 0| indicates that |adtest| fails to reject
% the null hypothesis at the default 5% significance level.