comparison m-toolbox/classes/+utils/@math/Chi2cdf.m @ 0:f0afece42f48

Import.
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Wed, 23 Nov 2011 19:22:13 +0100
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:f0afece42f48
1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 %
3 % Compute Chi square cumulative distribution function
4 %
5 % CALL
6 %
7 % p = Chi2cdf(x,v);
8 %
9 %
10 % INPUT
11 %
12 % - x, data
13 % - v, degrees of freedom of the distribution
14 %
15 % References:
16 % [1] M. Abramowitz and I. A. Stegun, "Handbook of Mathematical
17 % Functions", Government Printing Office, 1964, 26.4.
18 %
19 %
20 % L Ferraioli 14-02-2011
21 %
22 % $Id: Chi2cdf.m,v 1.2 2011/05/30 17:18:09 luigi Exp $
23 %
24 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
25 function p = Chi2cdf(x,v)
26
27 % Call the gamma distribution function.
28 p = gammainc(x./2,v/2);
29
30
31 end