next up previous contents
Next: GAMMA Gamma Function Up: Mathematical Functions Previous: DAWSON Dawson Integral Function   Contents

Subsections

PSI Psi Function

Usage

Computes the psi function for real arguments. The psi function takes only a single argument

  y = psi(x)

where x is either a float or double array. The output vector y is the same size (and type) as x.

Function Internals

The psi function is defined as

$\displaystyle \frac{d}{dx} \ln \gamma(x)
$

and for integer arguments, is equivalent to the factorial function.

Example

Here is a plot of the psi function over the range [-5,5].

--> x = linspace(-5,5);
--> y = psi(x);
--> plot(x,y); xlabel('x'); ylabel('psi(x)');

which results in the following plot.

3624



Samit K. Basu 2005-03-16