Watch this Author's files
i have wind speed data including 365 values. how can we define the "n" value?
I think the line for calculation of p value should be corrected from pval=1-gammainc(x2/2, (length(O)-3)/2); %p value to pval=1-gammainc(x2/2, (length(O)-1)/2); %p value since degrees of freedom as gamma function parameter was incorrectly defined
0_freq is a row vec and e_freq is a column vec...so i had to modify line 100 chi2bins = ((o_freq' - e_freq).^2)./e_freq; to make it work.
good
Contact us at files@mathworks.com