Dear all,
I want to have the result of kstest (Kolmogorov-Smirnov test) for all arrays in a cell. In fact, I have a 1×93 cell that contains 93 doubles and the third column of these doubles is the column that I want to calculate kstest for. I searched and write this script:
for i=1:length(C1)[h, p, k2stat] = arrayfun(@kstest, C1{1,i}(:, end), 'UniformOutput', false);end
Although it runs successfully and the output is h with 336×1; I believe it gives me the wrong answer cause when I manually check some cell arrays it gives me the different answer (in some cases the output of my script reject null hypothesis while when I manually check it using this code:
kstest(C1{1,27}(:,end))
it's accepts the null hypothesis. So please let me what is my mistake if you know. I attached a small sample.
Thank you in advance
Best Answer