Hello Team Support
Dear I hope you are healthy during this epidemic crisis
I am trying to use chi2test function run and use for other program, but I see this error, please help me to solve the issue.
Thanks.
function H=chi2test(x, Alpha)
N=length(x);
x=(x-mean(x))/std(x);
xp=[-inf, -1.6:.4:1.6, inf];
E=0.5*N*diff(erfc(-xp/sqrt(2)));
S=histcounts(x, xp);
O=S(1:end-1);
x2=sum((E-O).^2./E);
pval=1-gammainc(x2/2,(length(O)-3)/2);
H=(pval>=Alpha);
end
Makes this error
>> Chi2test(3,0.05)
Cannot find an exact (case-sensitive) match for 'Chi2test'
The closest match is: chi2test in D:\Education\ \FouthSemester\M \MLpractice\chi2test.m