function x = spm_invXcdf(F,v) % Inverse Cumulative Distribution Function (CDF) of Chi-squared distribution % FORMAT x = spm_invXcdf(F,v) % % F - CDF (lower tail p-value) % v - degrees of freedom (v>0, non-integer d.f. accepted) % x - Chi-squared ordinates at which CDF F(x)=F %__________________________________________________________________________ % % spm_invXcdf implements the inverse Cumulative Distribution of the % Chi-squared distribution. % % Definition: %-------------------------------------------------------------------------- % The Chi-squared distribution with v degrees of freedom is defined for % positive integer v and x in [0,Inf). The Cumulative Distribution % Function (CDF) F(x) is the probability that a realisation of a % Chi-squared random variable X has value less than x. F(x)=Pr{X