NCL Home >
Documentation >
Functions >
Cumulative distribution functions
cdfgam_p
Calculates the integral of a cumulative gamma distribution function.
Prototype
function cdfgam_p ( x : numeric, shape : numeric, scale : numeric ) return_val : numeric
Arguments
xA multi-dimensional array or scalar value equal to upper limit of integration of the gamma density. (x ≥ 0.)
shapeA multi-dimensional array or scalar value equal to the scale parameter of the gamma density (shape > 0.0)
scaleA multi-dimensional array or scalar value equal to the shape parameter of the gamma density (scale > 0.0)
Return value
A array of the same size as x. Double if any of the input arguments are double, float otherwise.
Description
Calculates the intergral of a cumulative gamma distribution
function.
The source code is from source routine "CDFGAM" from
DCDFLIB
(Double precision Cumulative Distribution Function LIBrary)
See Also
Examples
Example 1
x = 6.29579
shape = 3.0
scale = 1.0
P = cdfgam_p(x,shape,scale)
print("P="+P) ; P = 0.95