Next: More about Octave and Up: Interactive Fortran: Octave and Previous: Matlab

Using help in Octave and in Matlab

You can ask both Matlab and Octave about the meaning of any predefined function by using the help command. So to ask about gammai in Octave type:

octave:38> help gammai
gammai is the function defined from:
/afs/ovpit.indiana.edu/sun4x_56/gnu/share/octave/2.0.13/m/specfun/gammai.m

usage: gammai (a, x)

Compute the incomplete gamma function

gammai (a, x) = (\int_0^x exp(-t) t^(a-1) dt) / gamma(a).

If a is scalar, then gammai (a, x) is returned for each element of x
and vice versa.

If neither a nor x is scalar, the sizes of a and x must agree, and
gammainc is applied for corresponding elements of x and a.

Additional help for builtin functions, operators, and variables
is available in the on-line version of the manual.  Use the command
help -i <topic>' to search the manual index.

Help and information about Octave is also available on the WWW
at http://www.che.wisc.edu/octave/octave.html and via the
help-octave@bevo.che.wisc.edu mailing list.
octave:39>


And now the same in Matlab:

>> help gammainc

GAMMAINC Incomplete gamma function.
Y = GAMMAINC(X,A) evaluates the incomplete gamma function for
corresponding elements of X and A.  X and A must be real and the same
size (or either can be a scalar).  A must also be non-negative.
The incomplete gamma function is defined as:

gammainc(x,a) = 1 ./ gamma(a) .*
integral from 0 to x of t^(a-1) exp(-t) dt

For any a>=0, as x approaches infinity, gammainc(x,a) approaches 1.
For small x and a, gammainc(x,a) ~= x^a, so gammainc(0,0) = 1.

>>


For compatibility reasons, compatibility with Matlab that is, Octave also has function gammainc:

octave:39> help gammainc
gammainc is a builtin function

gammainc (x, a)

Compute the incomplete gamma function

gammainc(x,a) = (\int_0^x exp(-t) t^(a-1) dt) / gamma(a).

If a is scalar, then gammainc(x,a) is returned for each element of x
and vice versa.

If neither a nor x is scalar, the sizes of a and x must agree, and
gammainc is applied for corresponding elements of x and a.

Additional help for builtin functions, operators, and variables
is available in the on-line version of the manual.  Use the command
help -i <topic>' to search the manual index.

Help and information about Octave is also available on the WWW
at http://www.che.wisc.edu/octave/octave.html and via the
help-octave@bevo.che.wisc.edu mailing list.
octave:40>


Zdzislaw Meglicki
2001-02-26