chisquare_solve.m

来自「%WAVETEST Example Matlab script for WAVE」· M 代码 · 共 26 行

M
26
字号
function PDIFF = chisquare_solve(XGUESS,P,V);%CHISQUARE_SOLVE  Internal function used by CHISQUARE_INV%%   PDIFF=chisquare_solve(XGUESS,P,V)  Given XGUESS, a percentile P,%   and degrees-of-freedom V, return the difference between%   calculated percentile and P.% Uses GAMMAINC%% Written January 1998 by C. Torrence% extra factor of V is necessary because X is Normalized	PGUESS = gammainc(V*XGUESS/2,V/2);  % incomplete Gamma function		PDIFF = abs(PGUESS - P);            % error in calculated P		TOL = 1E-4;	if (PGUESS >= 1-TOL)  % if P is very close to 1 (i.e. a bad guess)		PDIFF = XGUESS;   % then just assign some big number like XGUESS	end	return% end of code

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?