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

    %% Test Data for Equal Variances  

%% 
% Load the sample data. 
load examgrades

%% 
% Test the null hypothesis that the variances are equal across the five
% columns of data in the students’ exam grades matrix, |grades|. 
vartestn(grades)       

%%
% The low $p$-value, |p = 0|, indicates that |vartestn| rejects the null
% hypothesis that the variances are equal across all five columns, in favor
% of the alternative hypothesis that at least one column has a different
% variance.