QCHISQ The chisquare inverse distribution function x = qchisq(p,DegreesOfFreedom)
0001 function x = qchisq(p,a) 0002 %QCHISQ The chisquare inverse distribution function 0003 % 0004 % x = qchisq(p,DegreesOfFreedom) 0005 0006 % Anders Holtsberg, 18-11-93 0007 % Copyright (c) Anders Holtsberg 0008 0009 if any(any(abs(2*p-1)>1)) 0010 error('A probability should be 0<=p<=1, please!') 0011 end 0012 if any(any(a<=0)) 0013 error('DegreesOfFreedom is wrong') 0014 end 0015 0016 x = qgamma(p,a*0.5)*2;