### DO NOT EDIT!
###
### This file is generated automatically from the Octave sources.
### Edit those files instead and run make to update this file.

__contourc__
-*- texinfo -*-
@deftypefn {Loadable Function} {} __contourc__ (@var{x}, @var{y}, @var{z}, @var{levels})
@end deftypefn
__delaunayn__
-*- texinfo -*-
@deftypefn {Loadable Function} {@var{T} =} __delaunayn__ (@var{P}[, @var{opt}])
Internal function for delaunayn.
@end deftypefn
__dsearchn__
-*- texinfo -*-
@deftypefn {Loadable Function} {[@var{idx}, @var{d}] =} dsearch (@var{x}, @var{xi})
Internal function for dsearchn.
@end deftypefn
__glpk__
-*- texinfo -*-
@deftypefn {Loadable Function} {[@var{values}] =} __glpk__ (@var{args})
Internal interface for the GNU GLPK library.
You should be using using the @code{glpk} function instead.
@end deftypefn
__gnuplot_save_data__
-*- texinfo -*-
@deftypefn {Loadable Function} {} __gnuplot_save_data__ (@var{data}, @var{ndim}, @var{parametric})
@end deftypefn
gnuplot_binary
-*- texinfo -*-
@deftypefn {Loadable Function} {@var{val} =} gnuplot_binary ()
@deftypefnx {Loadable Function} {@var{old_val} =} gnuplot_binary (@var{new_val})
Query or set the name of the program invoked by the plot command.
The default value @code{"gnuplot"}.  @xref{Installation}.
@end deftypefn
gnuplot_command_plot
-*- texinfo -*-
@deftypefn {Loadable Function} {@var{val} = } gnuplot_command_plot ()
@deftypefnx {Loadable Function} {@var{old_val} = } gnuplot_command_plot (@var{new_val})
@end deftypefn
gnuplot_command_replot
-*- texinfo -*-
@deftypefn {Loadable Function} {@var{val} =} gnuplot_command_replot ()
@deftypefnx {Loadable Function} {@var{old_val} =} gnuplot_command_replot (@var{new_val})
@end deftypefn
gnuplot_command_splot
-*- texinfo -*-
@deftypefn {Loadable Function} {@var{val} =} gnuplot_command_splot ()
@deftypefnx {Loadable Function} {@var{old_val} =} gnuplot_command_splot (@var{new_val})
@end deftypefn
gnuplot_command_using
-*- texinfo -*-
@deftypefn {Loadable Function} {@var{val} =} gnuplot_command_using ()
@deftypefnx {Loadable Function} {@var{old_val} =} gnuplot_command_using (@var{new_val})
@end deftypefn
gnuplot_command_with
-*- texinfo -*-
@deftypefn {Loadable Function} {@var{val} =} gnuplot_command_with ()
@deftypefnx {Loadable Function} {@var{old_val} =} gnuplot_command_with (@var{new_val})
@end deftypefn
gnuplot_command_axes
-*- texinfo -*-
@deftypefn {Loadable Function} {@var{val} =} gnuplot_command_axes ()
@deftypefnx {Loadable Function} {@var{old_val} =} gnuplot_command_axes (@var{new_val})
@end deftypefn
gnuplot_command_title
-*- texinfo -*-
@deftypefn {Loadable Function} {@var{val} =} gnuplot_command_title ()
@deftypefnx {Loadable Function} {@var{old_val} =} gnuplot_command_title (@var{new_val})
@end deftypefn
gnuplot_command_end
-*- texinfo -*-
@deftypefn {Loadable Function} {@var{val} =} gnuplot_command_end ()
@deftypefnx {Loadable Function} {@var{old_val} =} gnuplot_command_end (@var{new_val})
@end deftypefn
gnuplot_use_title_option
-*- texinfo -*-
@deftypefn {Loadable Function} {@var{val} =} gnuplot_use_title_option ()
@deftypefnx {Loadable Function} {@var{old_val} =} gnuplot_use_title_option (@var{new_val})
If enabled, append @samp{-title "Figure NN"} to the gnuplot command.
By default, this feature is enabled if the @code{DISPLAY} environment
variable is set when Octave starts.
@end deftypefn
__clear_plot_window__
-*- texinfo -*-
@deftypefn {Loadable Function} {} clearplot
@deftypefnx {Loadable Function} {} clg
Clear the plot window and any titles or axis labels.
@end deftypefn
closeplot
-*- texinfo -*-
@deftypefn {Loadable Function} {} closeplot
Close stream to the @code{gnuplot} subprocess.  If you are using X11,
this will close the plot window.
@end deftypefn
purge_tmp_files
-*- texinfo -*-
@deftypefn {Loadable Function} {} purge_tmp_files
Delete the temporary files created by the plotting commands.

Octave creates temporary data files for @code{gnuplot} and then sends
commands to @code{gnuplot} through a pipe.  Octave will delete the
temporary files on exit, but if you are doing a lot of plotting you may
want to clean up in the middle of a session.

A future version of Octave will eliminate the need to use temporary
files to hold the plot data.
@end deftypefn
__gnuplot_raw__
-*- texinfo -*-
@deftypefn {Loadable Function} {} __gnuplot_raw__ (@var{string})
Send @var{string} directly to gnuplot subprocess.
@end deftypefn
__gnuplot_send_inline_data__
-*- texinfo -*-
@deftypefn {Loadable Function} {} __gnuplot_send_inline_data__ (@var{data}, @var{ndim}, @var{parametric})
Send @var{val} to gnuplot subprocess as inline data.
@end deftypefn
__gnuplot_set__
-*- texinfo -*-
@deffn {Loadable Function} __gnuplot_set__ options
Set plotting options for gnuplot
@end deffn
__gnuplot_show__
-*- texinfo -*-
@deffn {Loadable Function} __gnuplot_show__ options
Show plotting options.
@end deffn
__gnuplot_plot__
Plot with gnuplot.

__gnuplot_splot__
Plot with gnuplot.

__gnuplot_replot__
Plot with gnuplot.

__lin_interpn__
-*- texinfo -*-
@deftypefn {Loadable Function} {@var{vi} =} __lin_interpn__ (@var{x1}, @var{x2}, @dots{}, @var{xn}, @var{v}, @var{y1}, @var{y2}, @dots{}, @var{yn})
Perform @var{n}-dimensional interpolation.  Each element of then
@var{n}-dimensional array @var{v} represents a value at a location
given by the parameters @var{x1}, @var{x2},...,@var{xn}. The parameters
@var{x1}, @var{x2}, @dots{}, @var{xn} are either @var{n}-dimensional
arrays of the same size as the array @var{v} in the "ndgrid" format
or vectors.  The parameters @var{y1}, @var{y2}, @dots{}, @var{yn} are
all @var{n}-dimensional arrays of the same size and represent the
points at which the array @var{vi} is interpolated.

This function only performs linear interpolation.
@seealso{interp1, interp2, ndgrid}
@end deftypefn
__pchip_deriv__
-*- texinfo -*-
@deftypefn {Loadable Function} {} __pchip_deriv__ (@var{x}, @var{y})
Wrapper for SLATEC/PCHIP function DPCHIM to calculate the derivates for
piecewise polynomials.  You should be using @code{pchip} function instead.
@end deftypefn
__qp__
[x, lambda, info, iter] = __qp__ (x0, H, q, Aeq, beq, Ain, bin, maxit)
__voronoi__
-*- texinfo -*-
@deftypefn {Loadable Function} {@var{tri} =} __voronoi__ (@var{point})
@deftypefnx {Loadable Function} {@var{tri} =} __voronoi__ (@var{point}, @var{options})
Internal function for voronoi.
@end deftypefn
balance
-*- texinfo -*-
@deftypefn {Loadable Function} {@var{aa} =} balance (@var{a}, @var{opt})
@deftypefnx {Loadable Function} {[@var{dd}, @var{aa}] =} balance (@var{a}, @var{opt})
@deftypefnx {Loadable Function} {[@var{cc}, @var{dd}, @var{aa}, @var{bb}] =} balance (@var{a}, @var{b}, @var{opt})

@code{[dd, aa] = balance (a)} returns @code{aa = dd \ a * dd}.
@code{aa} is a matrix whose row and column norms are roughly equal in
magnitude, and @code{dd} = @code{p * d}, where @code{p} is a permutation
matrix and @code{d} is a diagonal matrix of powers of two.  This allows
the equilibration to be computed without roundoff.  Results of
eigenvalue calculation are typically improved by balancing first.

@code{[cc, dd, aa, bb] = balance (a, b)} returns @code{aa = cc*a*dd} and
@code{bb = cc*b*dd)}, where @code{aa} and @code{bb} have non-zero
elements of approximately the same magnitude and @code{cc} and @code{dd}
are permuted diagonal matrices as in @code{dd} for the algebraic
eigenvalue problem.

The eigenvalue balancing option @code{opt} is selected as follows:

@table @asis
@item @code{"N"}, @code{"n"}
No balancing; arguments copied, transformation(s) set to identity.

@item @code{"P"}, @code{"p"}
Permute argument(s) to isolate eigenvalues where possible.

@item @code{"S"}, @code{"s"}
Scale to improve accuracy of computed eigenvalues.

@item @code{"B"}, @code{"b"}
Permute and scale, in that order. Rows/columns of a (and b)
that are isolated by permutation are not scaled.  This is the default
behavior.
@end table

Algebraic eigenvalue balancing uses standard @sc{Lapack} routines.

Generalized eigenvalue problem balancing uses Ward's algorithm
(SIAM Journal on Scientific and Statistical Computing, 1981).
@end deftypefn
besselj
-*- texinfo -*-
@deftypefn {Loadable Function} {[@var{j}, @var{ierr}] =} besselj (@var{alpha}, @var{x}, @var{opt})
@deftypefnx {Loadable Function} {[@var{y}, @var{ierr}] =} bessely (@var{alpha}, @var{x}, @var{opt})
@deftypefnx {Loadable Function} {[@var{i}, @var{ierr}] =} besseli (@var{alpha}, @var{x}, @var{opt})
@deftypefnx {Loadable Function} {[@var{k}, @var{ierr}] =} besselk (@var{alpha}, @var{x}, @var{opt})
@deftypefnx {Loadable Function} {[@var{h}, @var{ierr}] =} besselh (@var{alpha}, @var{k}, @var{x}, @var{opt})
Compute Bessel or Hankel functions of various kinds:

@table @code
@item besselj
Bessel functions of the first kind.
@item bessely
Bessel functions of the second kind.
@item besseli
Modified Bessel functions of the first kind.
@item besselk
Modified Bessel functions of the second kind.
@item besselh
Compute Hankel functions of the first (@var{k} = 1) or second (@var{k}
 = 2) kind.
@end table

If the argument @var{opt} is supplied, the result is scaled by the
@code{exp (-I*@var{x})} for @var{k} = 1 or @code{exp (I*@var{x})} for
 @var{k} = 2.

If @var{alpha} is a scalar, the result is the same size as @var{x}.
If @var{x} is a scalar, the result is the same size as @var{alpha}.
If @var{alpha} is a row vector and @var{x} is a column vector, the
result is a matrix with @code{length (@var{x})} rows and
@code{length (@var{alpha})} columns.  Otherwise, @var{alpha} and
@var{x} must conform and the result will be the same size.

The value of @var{alpha} must be real.  The value of @var{x} may be
complex.

If requested, @var{ierr} contains the following status information
and is the same size as the result.

@enumerate 0
@item
Normal return.
@item
Input error, return @code{NaN}.
@item
Overflow, return @code{Inf}.
@item
Loss of significance by argument reduction results in less than
half of machine accuracy.
@item
Complete loss of significance by argument reduction, return @code{NaN}.
@item
Error---no computation, algorithm termination condition not met,
return @code{NaN}.
@end enumerate
@end deftypefn
bessely
-*- texinfo -*-
@deftypefn {Loadable Function} {[@var{y}, @var{ierr}] =} bessely (@var{alpha}, @var{x}, @var{opt})
See besselj.
@end deftypefn
besseli
-*- texinfo -*-
@deftypefn {Loadable Function} {[@var{i}, @var{ierr}] =} besseli (@var{alpha}, @var{x}, @var{opt})
See besselj.
@end deftypefn
besselk
-*- texinfo -*-
@deftypefn {Loadable Function} {[@var{k}, @var{ierr}] =} besselk (@var{alpha}, @var{x}, @var{opt})
See besselj.
@end deftypefn
besselh
-*- texinfo -*-
@deftypefn {Loadable Function} {[@var{h}, @var{ierr}] =} besselh (@var{alpha}, @var{k}, @var{x}, @var{opt})
See besselj.
@end deftypefn
airy
-*- texinfo -*-
@deftypefn {Loadable Function} {[@var{a}, @var{ierr}] =} airy (@var{k}, @var{z}, @var{opt})
Compute Airy functions of the first and second kind, and their
derivatives.

@example
  K   Function   Scale factor (if a third argument is supplied)
 ---  --------   ----------------------------------------------
  0   Ai (Z)     exp ((2/3) * Z * sqrt (Z))
  1   dAi(Z)/dZ  exp ((2/3) * Z * sqrt (Z))
  2   Bi (Z)     exp (-abs (real ((2/3) * Z *sqrt (Z))))
  3   dBi(Z)/dZ  exp (-abs (real ((2/3) * Z *sqrt (Z))))
@end example

The function call @code{airy (@var{z})} is equivalent to
@code{airy (0, @var{z})}.

The result is the same size as @var{z}.

If requested, @var{ierr} contains the following status information and
is the same size as the result.

@enumerate 0
@item
Normal return.
@item
Input error, return @code{NaN}.
@item
Overflow, return @code{Inf}.
@item
Loss of significance by argument reduction results in less than half
 of machine accuracy.
@item
Complete loss of significance by argument reduction, return @code{NaN}.
@item
Error---no computation, algorithm termination condition not met,
return @code{NaN}.
@end enumerate
@end deftypefn
betainc
-*- texinfo -*-
@deftypefn {Mapping Function} {} betainc (@var{x}, @var{a}, @var{b})
Return the incomplete Beta function,
@iftex
@tex
$$
 \beta (x, a, b) = B (a, b)^{-1} \int_0^x t^{(a-z)} (1-t)^{(b-1)} dt.
$$
@end tex
@end iftex
@ifinfo

@smallexample
                                      x
                                     /
betainc (x, a, b) = beta (a, b)^(-1) | t^(a-1) (1-t)^(b-1) dt.
                                     /
                                  t=0
@end smallexample
@end ifinfo

If x has more than one component, both @var{a} and @var{b} must be
scalars.  If @var{x} is a scalar, @var{a} and @var{b} must be of
compatible dimensions.
@end deftypefn
bitand
-*- texinfo -*-
@deftypefn {Built-in Function} {} bitand (@var{x}, @var{y})
Return the bitwise AND of nonnegative integers.
@var{x}, @var{y} must be in range [0..bitmax]
@seealso{bitor, bitxor, bitset, bitget, bitcmp, bitshift, bitmax}
@end deftypefn
bitor
-*- texinfo -*-
@deftypefn {Built-in Function} {} bitor (@var{x}, @var{y})
Return the bitwise OR of nonnegative integers.
@var{x}, @var{y} must be in range [0..bitmax]
@seealso{bitor, bitxor, bitset, bitget, bitcmp, bitshift, bitmax}
@end deftypefn
bitxor
-*- texinfo -*-
@deftypefn {Built-in Function} {} bitxor (@var{x}, @var{y})
Return the bitwise XOR of nonnegative integers.
@var{x}, @var{y} must be in range [0..bitmax]
@seealso{bitand, bitor, bitset, bitget, bitcmp, bitshift, bitmax}
@end deftypefn
bitshift
-*- texinfo -*-
@deftypefn {Built-in Function} {} bitshift (@var{a}, @var{k})
@deftypefnx {Built-in Function} {} bitshift (@var{a}, @var{k}, @var{n})
Return a @var{k} bit shift of @var{n}- digit unsigned
integers in @var{a}.  A positive @var{k} leads to a left shift.
A negative value to a right shift.  If @var{n} is omitted it defaults
to log2(bitmax)+1.
@var{n} must be in range [1,log2(bitmax)+1] usually [1,33]

@example
bitshift (eye (3), 1))
@result{}
@group
2 0 0
0 2 0
0 0 2
@end group

bitshift (10, [-2, -1, 0, 1, 2])
@result{} 2   5  10  20  40
@c FIXME -- restore this example when third arg is allowed to be an array.
@c 
@c 
@c bitshift ([1, 10], 2, [3,4])
@c @result{} 4  8
@end example
@seealso{bitand, bitor, bitxor, bitset, bitget, bitcmp, bitmax}
@end deftypefn
bitmax
-*- texinfo -*-
@deftypefn {Built-in Function} {} bitmax ()
Return the largest integer that can be represented as a floating point
value.  On IEEE-754 compatiable systems, @code{bitmax} is @code{2^53 - 1}.
@end deftypefn
intmax
-*- texinfo -*-
@deftypefn {Built-in Function} {} intmax (@var{type})
Return the largest integer that can be represented in an integer type.
The variable @var{type} can be

@table @code
@item int8
signed 8-bit integer.
@item int16
signed 16-bit integer.
@item int32
signed 32-bit integer.
@item int64
signed 64-bit integer.
@item uint8
unsigned 8-bit integer.
@item uint16
unsigned 16-bit integer.
@item uint32
unsigned 32-bit integer.
@item uint64
unsigned 64-bit integer.
@end table

The default for @var{type} is @code{uint32}.
@seealso{intmin, bitmax}
@end deftypefn
intmin
-*- texinfo -*-
@deftypefn {Built-in Function} {} intmin (@var{type})
Return the smallest integer that can be represented in an integer type.
The variable @var{type} can be

@table @code
@item int8
signed 8-bit integer.
@item int16
signed 16-bit integer.
@item int32
signed 32-bit integer.
@item int64
signed 64-bit integer.
@item uint8
unsigned 8-bit integer.
@item uint16
unsigned 16-bit integer.
@item uint32
unsigned 32-bit integer.
@item uint64
unsigned 64-bit integer.
@end table

The default for @var{type} is @code{uint32}.
@seealso{intmax, bitmax}
@end deftypefn
bsxfun
 -*- texinfo -*-
@deftypefn {Lodable Function} {} bsxfun (@var{f}, @var{a}, @var{b})
Applies a binary function @var{f} element-wise to two matrix arguments
@var{a} and @var{b}. The function @var{f} must be capable of accepting
two column vector arguments of equal length, or one column vector
argument and a scalar.

The dimensions of @var{a} and @var{b} must be equal or singleton. The
singleton dimensions of the matirces will be expanded to the same
dimensionality as the other matrix.

@seealso{arrayfun, cellfun}
@end deftypefn
ccolamd
-*- texinfo -*-
@deftypefn {Loadable Function} {@var{p} =} ccolamd (@var{s})
@deftypefnx {Loadable Function} {@var{p} =} ccolamd (@var{s}, @var{knobs})
@deftypefnx {Loadable Function} {@var{p} =} ccolamd (@var{s}, @var{knobs}, @var{cmember})
@deftypefnx {Loadable Function} {[@var{p}, @var{stats}] =} ccolamd (@dots{})

Constrained column approximate minimum degree permutation. @code{@var{p} =
ccolamd (@var{s})} returns the column approximate minimum degree permutation
vector for the sparse matrix @var{s}. For a non-symmetric matrix @var{s},
@code{@var{s}(:,@var{p})} tends to have sparser LU factors than @var{s}.
@code{chol (@var{s}(:,@var{p})'*@var{s}(:,@var{p}))} also tends to be
sparser than @code{chol (@var{s}'*@var{s})}. @code{@var{p} = ccolamd
(@var{s},1)} optimizes the ordering for @code{lu (@var{s}(:,@var{p}))}.
The ordering is followed by a column elimination tree post-ordering.

@var{knobs} is an optional one- to five-element input vector, with a default
value of @code{[0 10 10 1 0]} if not present or empty.  Entries not present
are set to their defaults.

@table @code
@item @var{knobs}(1)
if nonzero, the ordering is optimized for @code{lu(S(:,p))}. It will be a
poor ordering for @code{chol(@var{s}(:,@var{p})'*@var{s}(:,@var{p}))}. This
is the most important knob for ccolamd.

@item @var{knob}(2)
if @var{s} is m-by-n, rows with more than @code{max(16,@var{knobs}(2)*
sqrt(n))} entries are ignored.

@item @var{knob}(3)
columns with more than @code{max(16,@var{knobs}(3)*sqrt(min(m,n)))}
entries are ignored and ordered last in the output permutation (subject
to the cmember constraints).

@item @var{knob}(4)
if nonzero, aggressive absorption is performed.

@item @var{knob}(5)
if nonzero, statistics and knobs are printed.

@end table

@var{cmember} is an optional vector of length n.  It defines the constraints
on the column ordering.  If @code{@var{cmember}(j) = @var{c}}, then column j
is in constraint set @var{c} (@var{c} must be in the range 1 to n).  In
the output permutation @var{p}, all columns in set 1 appear first, followed
by all columns in set 2, and so on.  @code{@var{cmember} = ones(1,n)} if
not present or empty.  @code{ccolamd (@var{s},[],1:n)} returns @code{1:n}

@code{@var{p} = ccolamd(@var{s})} is about the same as @code{@var{p} =
colamd(@var{s})}. @var{knobs} and its default values differ. @code{colamd}
always does aggressive absorption, and it finds an ordering suitable for
both @code{lu(@var{s}(:,@var{p}))} and @code{chol(@var{S}(:,@var{p})'*
@var{s}(:,@var{p}))}; it cannot optimize its ordering for @code{lu(@var{s}
(:,@var{p}))} to the extent that @code{ccolamd(@var{s},1)} can.

@var{stats} is an optional 20-element output vector that provides data
about the ordering and the validity of the input matrix @var{s}. Ordering
statistics are in @code{@var{stats} (1:3)}. @code{@var{stats} (1)} and
@code{@var{stats} (2)} are the number of dense or empty rows and columns
ignored by CCOLAMD and @code{@var{stats} (3)} is the number of garbage
collections performed on the internal data structure used by CCOLAMD
(roughly of size @code{2.2 * nnz(@var{s}) + 4 * @var{m} + 7 * @var{n}}
integers).

@code{@var{stats} (4:7)} provide information if CCOLAMD was able to
continue. The matrix is OK if @code{@var{stats} (4)} is zero, or 1 if
invalid. @code{@var{stats} (5)} is the rightmost column index that is
unsorted or contains duplicate entries, or zero if no such column exists.
@code{@var{stats} (6)} is the last seen duplicate or out-of-order row
index in the column index given by @code{@var{stats} (5)}, or zero if no
such row index exists. @code{@var{stats} (7)} is the number of duplicate
or out-of-order row indices. @code{@var{stats} (8:20)} is always zero in
the current version of CCOLAMD (reserved for future use).

The authors of the code itself are S. Larimore, T. Davis (Uni of Florida)
and S. Rajamanickam in collaboration with J. Bilbert and E. Ng. Supported
by the National Science Foundation (DMS-9504974, DMS-9803599, CCR-0203270),
and a grant from Sandia National Lab.  See
@url{http://www.cise.ufl.edu/research/sparse} for ccolamd, csymamd, amd,
colamd, symamd, and other related orderings.
@seealso{colamd, csymamd}
@end deftypefn
csymamd
-*- texinfo -*-
@deftypefn {Loadable Function} {@var{p} =} csymamd (@var{s})
@deftypefnx {Loadable Function} {@var{p} =} csymamd (@var{s}, @var{knobs})
@deftypefnx {Loadable Function} {@var{p} =} csymamd (@var{s}, @var{knobs}, @var{cmember})
@deftypefnx {Loadable Function} {[@var{p}, @var{stats}] =} csymamd (@dots{})

For a symmetric positive definite matrix @var{s}, returns the permutation
vector @var{p} such that @code{@var{s}(@var{p},@var{p})} tends to have a
sparser Cholesky factor than @var{s}. Sometimes @code{csymamd} works well
for symmetric indefinite matrices too. The matrix @var{s} is assumed to
be symmetric; only the strictly lower triangular part is referenced.
@var{s} must be square. The ordering is followed by an elimination tree
post-ordering.

@var{knobs} is an optional one- to three-element input vector, with a
default value of @code{[10 1 0]} if present or empty.  Entries not
present are set to their defaults.

@table @code
@item @var{knobs}(1)
If @var{s} is n-by-n, then rows and columns with more than
@code{max(16,@var{knobs}(1)*sqrt(n))} entries are ignored, and ordered
last in the output permutation (subject to the cmember constraints).

@item @var{knobs}(2)
If nonzero, aggressive absorption is performed.

@item @var{knobs}(3)
If nonzero, statistics and knobs are printed.

@end table

@var{cmember} is an optional vector of length n. It defines the constraints
on the ordering. If @code{@var{cmember}(j) = @var{s}}, then row/column j is
in constraint set @var{c} (@var{c} must be in the range 1 to n). In the
output permutation @var{p}, rows/columns in set 1 appear first, followed
by all rows/columns in set 2, and so on. @code{@var{cmember} = ones(1,n)}
if not present or empty. @code{csymamd(@var{s},[],1:n)} returns @code{1:n}.

@code{@var{p} = csymamd(@var{s})} is about the same as @code{@var{p} =
symamd(@var{s})}. @var{knobs} and its default values differ.

@code{@var{stats} (4:7)} provide information if CCOLAMD was able to
continue. The matrix is OK if @code{@var{stats} (4)} is zero, or 1 if
invalid. @code{@var{stats} (5)} is the rightmost column index that is
unsorted or contains duplicate entries, or zero if no such column exists.
@code{@var{stats} (6)} is the last seen duplicate or out-of-order row
index in the column index given by @code{@var{stats} (5)}, or zero if no
such row index exists. @code{@var{stats} (7)} is the number of duplicate
or out-of-order row indices. @code{@var{stats} (8:20)} is always zero in
the current version of CCOLAMD (reserved for future use).

The authors of the code itself are S. Larimore, T. Davis (Uni of Florida)
and S. Rajamanickam in collaboration with J. Bilbert and E. Ng. Supported
by the National Science Foundation (DMS-9504974, DMS-9803599, CCR-0203270),
and a grant from Sandia National Lab.  See
@url{http://www.cise.ufl.edu/research/sparse} for ccolamd, csymamd, amd,
colamd, symamd, and other related orderings.
@seealso{symamd, ccolamd}
@end deftypefn
cellfun
 -*- texinfo -*-
@deftypefn {Loadable Function} {} cellfun (@var{name}, @var{c})
@deftypefnx {Loadable Function} {} cellfun ("size", @var{c}, @var{k})
@deftypefnx {Loadable Function} {} cellfun ("isclass", @var{c}, @var{class})
@deftypefnx {Loadable Function} {} cellfun (@var{func}, @var{c})
@deftypefnx {Loadable Function} {} cellfun (@var{func}, @var{c}, @var{d})
@deftypefnx {Loadable Function} {[@var{a}, @var{b}] =} cellfun (@dots{})
@deftypefnx {Loadable Function} {} cellfun (@dots{}, 'ErrorHandler', @var{errfunc})
@deftypefnx {Loadable Function} {} cellfun (@dots{}, 'UniformOutput', @var{val})

Evaluate the function named @var{name} on the elements of the cell array
@var{c}.  Elements in @var{c} are passed on to the named function
individually.  The function @var{name} can be one of the functions

@table @code
@item isempty
Return 1 for empty elements.
@item islogical
Return 1 for logical elements.
@item isreal
Return 1 for real elements.
@item length
Return a vector of the lengths of cell elements.
@item ndims
Return the number of dimensions of each element.
@item prodofsize
Return the product of dimensions of each element.
@item size
Return the size along the @var{k}-th dimension.
@item isclass
Return 1 for elements of @var{class}.
@end table

Additionally, @code{cellfun} accepts an arbitrary function @var{func}
in the form of an inline function, function handle, or the name of a
function (in a character string). In the case of a character string
argument, the function must accept a single argument named @var{x}, and
it must return a string value. The function can take one or more arguments,
with the inputs args given by @var{c}, @var{d}, etc. Equally the function
can return one or more output arguments. For example

@example
@group
cellfun (@@atan2, @{1, 0@}, @{0, 1@})
@result{}ans = [1.57080   0.00000]
@end group
@end example

Note that the default output argument is an array of the same size as the
input arguments.

If the param 'UniformOutput' is set to true (the default), then the function
must return either a single element which will be concatenated into the
return value. If 'UniformOutput is false, the outputs are concatenated in
a cell array. For example

@example
@group
cellfun ("tolower(x)", @{"Foo", "Bar", "FooBar"@},
         "UniformOutput",false)
@result{} ans = @{"foo", "bar", "foobar"@}
@end group
@end example

Given the parameter 'ErrorHandler', then @var{errfunc} defines a function to
call in case @var{func} generates an error. The form of the function is

@example
function [@dots{}] = errfunc (@var{s}, @dots{})
@end example

where there is an additional input argument to @var{errfunc} relative to
@var{func}, given by @var{s}. This is a structure with the elements
'identifier', 'message' and 'index', giving respectively the error
identifier, the error message, and the index into the input arguments
of the element that caused the error. For example

@example
@group
function y = foo (s, x), y = NaN; endfunction
cellfun (@@factorial, @{-1,2@},'ErrorHandler',@@foo)
@result{} ans = [NaN 2]
@end group
@end example

@seealso{isempty, islogical, isreal, length, ndims, numel, size, isclass}
@end deftypefn
num2cell
-*- texinfo -*-
@deftypefn {Loadable Function} {@var{c} =} num2cell (@var{m})
@deftypefnx {Loadable Function} {@var{c} =} num2cell (@var{m}, @var{d})
Convert to matrix @var{m} into a cell array. If @var{d} is defined the
value @var{c} is of dimension 1 in this dimension and the elements of
@var{m} are placed in slices in @var{c}.
@seealso{mat2cell}
@end deftypefn
mat2cell
-*- texinfo -*-
@deftypefn {Loadable Function} {@var{b} =} mat2cell (@var{a}, @var{m}, @var{n})
@deftypefnx {Loadable Function} {@var{b} =} mat2cell (@var{a}, @var{d1}, @var{d2}, @dots{})
@deftypefnx {Loadable Function} {@var{b} =} mat2cell (@var{a}, @var{r})
Converts the matrix @var{a} to a cell array If @var{a} is 2-D, then
it is required that @code{sum (@var{m}) == size (@var{a}, 1)} and
@code{sum (@var{n}) == size (@var{a}, 2)}. Similarly, if @var{a} is
a multi-dimensional and the number of dimensional arguments is equal
to the dimensions of @var{a}, then it is required that @code{sum (@var{di})
== size (@var{a}, i)}.

Given a single dimensional argument @var{r}, the other dimensional
arguments are assumed to equal @code{size (@var{a},@var{i})}.

An example of the use of mat2cell is

@example
@group
mat2cell (reshape(1:16,4,4),[3,1],[3,1])
@result{} @{
  [1,1] =

     1   5   9
     2   6  10
     3   7  11

  [2,1] =

     4   8  12

  [1,2] =

    13
    14
    15

  [2,2] = 16
@}
@end group
@end example
@seealso{num2cell, cell2mat}
@end deftypefn
chol
-*- texinfo -*-
@deftypefn {Loadable Function} {} chol (@var{a})
@cindex Cholesky factorization
Compute the Cholesky factor, @var{r}, of the symmetric positive definite
matrix @var{a}, where
@iftex
@tex
$ R^T R = A $.
@end tex
@end iftex
@ifinfo

@example
r' * r = a.
@end example
@end ifinfo
@seealso{cholinv, chol2inv}
@end deftypefn
cholinv
-*- texinfo -*-
@deftypefn {Loadable Function} {} cholinv (@var{a})
Use the Cholesky factorization to compute the inverse of the
symmetric positive definite matrix @var{a}.
@seealso{chol, chol2inv}
@end deftypefn
chol2inv
-*- texinfo -*-
@deftypefn {Loadable Function} {} chol2inv (@var{u})
Invert a symmetric, positive definite square matrix from its Cholesky
decomposition, @var{u}.  Note that @var{u} should be an upper-triangular
matrix with positive diagonal elements.  @code{chol2inv (@var{u})}
provides @code{inv (@var{u}'*@var{u})} but it is much faster than
using @code{inv}.
@seealso{chol, cholinv}
@end deftypefn
colamd
-*- texinfo -*-
@deftypefn {Loadable Function} {@var{p} =} colamd (@var{s})
@deftypefnx {Loadable Function} {@var{p} =} colamd (@var{s}, @var{knobs})
@deftypefnx {Loadable Function} {[@var{p}, @var{stats}] =} colamd (@var{s})
@deftypefnx {Loadable Function} {[@var{p}, @var{stats}] =} colamd (@var{s}, @var{knobs})

Column approximate minimum degree permutation. @code{@var{p} = colamd
(@var{s})} returns the column approximate minimum degree permutation
vector for the sparse matrix @var{s}. For a non-symmetric matrix @var{s},
@code{@var{s} (:,@var{p})} tends to have sparser LU factors than @var{s}.
The Cholesky factorization of @code{@var{s} (:,@var{p})' * @var{s}
(:,@var{p})} also tends to be sparser than that of @code{@var{s}' *
@var{s}}.

@var{knobs} is an optional one- to three-element input vector.  If @var{s} is
m-by-n, then rows with more than @code{max(16,@var{knobs}(1)*sqrt(n))} entries
are ignored. Columns with more than @code{max(16,knobs(2)*sqrt(min(m,n)))}
entries are removed prior to ordering, and ordered last in the output
permutation @var{p}. Only completely dense rows or columns are removed
if @code{@var{knobs} (1)} and @code{@var{knobs} (2)} are < 0, respectively.
If @code{@var{knobs} (3)} is nonzero, @var{stats} and @var{knobs} are
printed.  The default is @code{@var{knobs} = [10 10 0]}.  Note that
@var{knobs} differs from earlier versions of colamd

@var{stats} is an optional 20-element output vector that provides data
about the ordering and the validity of the input matrix @var{s}. Ordering
statistics are in @code{@var{stats} (1:3)}. @code{@var{stats} (1)} and
@code{@var{stats} (2)} are the number of dense or empty rows and columns
ignored by COLAMD and @code{@var{stats} (3)} is the number of garbage
collections performed on the internal data structure used by COLAMD
(roughly of size @code{2.2 * nnz(@var{s}) + 4 * @var{m} + 7 * @var{n}}
integers).

Octave built-in functions are intended to generate valid sparse matrices,
with no duplicate entries, with ascending row indices of the nonzeros
in each column, with a non-negative number of entries in each column (!)
and so on.  If a matrix is invalid, then COLAMD may or may not be able
to continue.  If there are duplicate entries (a row index appears two or
more times in the same column) or if the row indices in a column are out
of order, then COLAMD can correct these errors by ignoring the duplicate
entries and sorting each column of its internal copy of the matrix
@var{s} (the input matrix @var{s} is not repaired, however). If a matrix
is invalid in other ways then COLAMD cannot continue, an error message is
printed, and no output arguments (@var{p} or @var{stats}) are returned.
COLAMD is thus a simple way to check a sparse matrix to see if it's
valid.

@code{@var{stats} (4:7)} provide information if COLAMD was able to
continue. The matrix is OK if @code{@var{stats} (4)} is zero, or 1 if
invalid. @code{@var{stats} (5)} is the rightmost column index that is
unsorted or contains duplicate entries, or zero if no such column exists.
@code{@var{stats} (6)} is the last seen duplicate or out-of-order row
index in the column index given by @code{@var{stats} (5)}, or zero if no
such row index exists. @code{@var{stats} (7)} is the number of duplicate
or out-of-order row indices. @code{@var{stats} (8:20)} is always zero in
the current version of COLAMD (reserved for future use).

The ordering is followed by a column elimination tree post-ordering.

The authors of the code itself are Stefan I. Larimore and Timothy A.
Davis (davis@@cise.ufl.edu), University of Florida.  The algorithm was
developed in collaboration with John Gilbert, Xerox PARC, and Esmond
Ng, Oak Ridge National Laboratory. (see
@url{http://www.cise.ufl.edu/research/sparse/colamd})
@seealso{colperm, symamd}
@end deftypefn
symamd
-*- texinfo -*-
@deftypefn {Loadable Function} {@var{p} =} symamd (@var{s})
@deftypefnx {Loadable Function} {@var{p} =} symamd (@var{s}, @var{knobs})
@deftypefnx {Loadable Function} {[@var{p}, @var{stats}] =} symamd (@var{s})
@deftypefnx {Loadable Function} {[@var{p}, @var{stats}] =} symamd (@var{s}, @var{knobs})

For a symmetric positive definite matrix @var{s}, returns the permutation
vector p such that @code{@var{s} (@var{p}, @var{p})} tends to have a
sparser Cholesky factor than @var{s}. Sometimes SYMAMD works well for
symmetric indefinite matrices too. The matrix @var{s} is assumed to be
symmetric; only the strictly lower triangular part is referenced. @var{s}
must be square.

@var{knobs} is an optional one- to two-element input vector.  If @var{s} is
n-by-n, then rows and columns with more than
@code{max(16,@var{knobs}(1)*sqrt(n))} entries are removed prior to ordering,
and ordered last in the output permutation @var{p}. No rows/columns are
removed if @code{@var{knobs}(1) < 0}.  If @code{@var{knobs} (2)} is nonzero,
@code{stats} and @var{knobs} are printed.  The default is @code{@var{knobs} 
= [10 0]}.  Note that @var{knobs} differs from earlier versions of symamd.

@var{stats} is an optional 20-element output vector that provides data
about the ordering and the validity of the input matrix @var{s}. Ordering
statistics are in @code{@var{stats} (1:3)}. @code{@var{stats} (1) =
@var{stats} (2)} is the number of dense or empty rows and columns
ignored by SYMAMD and @code{@var{stats} (3)} is the number of garbage
collections performed on the internal data structure used by SYMAMD
(roughly of size @code{8.4 * nnz (tril (@var{s}, -1)) + 9 * @var{n}}
integers).

Octave built-in functions are intended to generate valid sparse matrices,
with no duplicate entries, with ascending row indices of the nonzeros
in each column, with a non-negative number of entries in each column (!)
and so on.  If a matrix is invalid, then SYMAMD may or may not be able
to continue.  If there are duplicate entries (a row index appears two or
more times in the same column) or if the row indices in a column are out
of order, then SYMAMD can correct these errors by ignoring the duplicate
entries and sorting each column of its internal copy of the matrix S (the
input matrix S is not repaired, however).  If a matrix is invalid in
other ways then SYMAMD cannot continue, an error message is printed, and
no output arguments (@var{p} or @var{stats}) are returned.  SYMAMD is
thus a simple way to check a sparse matrix to see if it's valid.

@code{@var{stats} (4:7)} provide information if SYMAMD was able to
continue. The matrix is OK if @code{@var{stats} (4)} is zero, or 1
if invalid. @code{@var{stats} (5)} is the rightmost column index that
is unsorted or contains duplicate entries, or zero if no such column
exists. @code{@var{stats} (6)} is the last seen duplicate or out-of-order
row index in the column index given by @code{@var{stats} (5)}, or zero
if no such row index exists. @code{@var{stats} (7)} is the number of
duplicate or out-of-order row indices. @code{@var{stats} (8:20)} is
always zero in the current version of SYMAMD (reserved for future use).

The ordering is followed by a column elimination tree post-ordering.


The authors of the code itself are Stefan I. Larimore and Timothy A.
Davis (davis@@cise.ufl.edu), University of Florida.  The algorithm was
developed in collaboration with John Gilbert, Xerox PARC, and Esmond
Ng, Oak Ridge National Laboratory. (see
@url{http://www.cise.ufl.edu/research/sparse/colamd})
@seealso{colperm, colamd}
@end deftypefn
etree
-*- texinfo -*-
@deftypefn {Loadable Function} {@var{p} =} etree (@var{s})
@deftypefnx {Loadable Function} {@var{p} =} etree (@var{s}, @var{typ})
@deftypefnx {Loadable Function} {[@var{p}, @var{q}] =} etree (@var{s}, @var{typ})

Returns the elimination tree for the matrix @var{s}. By default @var{s}
is assumed to be symmetric and the symmetric elimination tree is
returned. The argument @var{typ} controls whether a symmetric or
column elimination tree is returned. Valid values of @var{typ} are
'sym' or 'col', for symmetric or column elimination tree respectively

Called with a second argument, @dfn{etree} also returns the postorder
permutations on the tree.
@end deftypefn
colloc
-*- texinfo -*-
@deftypefn {Loadable Function} {[@var{r}, @var{amat}, @var{bmat}, @var{q}] =} colloc (@var{n}, "left", "right")
Compute derivative and integral weight matrices for orthogonal
collocation using the subroutines given in J. Villadsen and
M. L. Michelsen, @cite{Solution of Differential Equation Models by
Polynomial Approximation}.
@end deftypefn
conv2
-*- texinfo -*-
@deftypefn {Loadable Function} {y =} conv2 (@var{a}, @var{b}, @var{shape})
@deftypefnx {Loadable Function} {y =} conv2 (@var{v1}, @var{v2}, @var{M}, @var{shape})

Returns 2D convolution of @var{a} and @var{b} where the size
of @var{c} is given by

@table @asis
@item @var{shape}= 'full'
returns full 2-D convolution
@item @var{shape}= 'same'
same size as a. 'central' part of convolution
@item @var{shape}= 'valid'
only parts which do not include zero-padded edges
@end table

By default @var{shape} is 'full'. When the third argument is a matrix
returns the convolution of the matrix @var{M} by the vector @var{v1}
in the column direction and by vector @var{v2} in the row direction
@end deftypefn
convhulln
-*- texinfo -*-
@deftypefn {Loadable Function} {@var{H} =} convhulln (@var{p})
@deftypefnx {Loadable Function} {@var{H} =} convhulln (@var{p}, @var{opt})
Returns an index vector to the points of the enclosing convex hull.
The input matrix of size [n, dim] contains n points of dimension dim.

If a second optional argument is given, it must be a string or cell array
of strings containing options for the underlying qhull command.  (See
the Qhull documentation for the available options.)  The default options
are "s Qci Tcv".

@seealso{convhull, delaunayn}
@end deftypefn
daspk_options
-*- texinfo -*-
@deftypefn {Loadable Function} {} daspk_options (@var{opt}, @var{val})
When called with two arguments, this function
allows you set options parameters for the function @code{daspk}.
Given one argument, @code{daspk_options} returns the value of the
corresponding option.  If no arguments are supplied, the names of all
the available options and their current values are displayed.

Options include

@table @code
@item "absolute tolerance"
Absolute tolerance.  May be either vector or scalar.  If a vector, it
must match the dimension of the state vector, and the relative
tolerance must also be a vector of the same length.
@item "relative tolerance"
Relative tolerance.  May be either vector or scalar.  If a vector, it
must match the dimension of the state vector, and the absolute
tolerance must also be a vector of the same length.

The local error test applied at each integration step is

@example
  abs (local error in x(i))
       <= rtol(i) * abs (Y(i)) + atol(i)
@end example
@item "compute consistent initial condition"
Denoting the differential variables in the state vector by @samp{Y_d}
and the algebraic variables by @samp{Y_a}, @code{ddaspk} can solve
one of two initialization problems:

@enumerate
@item Given Y_d, calculate Y_a and Y'_d
@item Given Y', calculate Y.
@end enumerate

In either case, initial values for the given components are input, and
initial guesses for the unknown components must also be provided as
input.  Set this option to 1 to solve the first problem, or 2 to solve
the second (the default default is 0, so you must provide a set of
initial conditions that are consistent).

If this option is set to a nonzero value, you must also set the
@code{"algebraic variables"} option to declare which variables in the
problem are algebraic.
@item "use initial condition heuristics"
Set to a nonzero value to use the initial condition heuristics options
described below.
@item "initial condition heuristics"
A vector of the following parameters that can be used to control the
initial condition calculation.

@table @code
@item MXNIT
Maximum number of Newton iterations (default is 5).
@item MXNJ
Maximum number of Jacobian evaluations (default is 6).
@item MXNH
Maximum number of values of the artificial stepsize parameter to be
tried if the @code{"compute consistent initial condition"} option has
been set to 1 (default is 5).

Note that the maximum number of Newton iterations allowed in all is
@code{MXNIT*MXNJ*MXNH} if the @code{"compute consistent initial
condition"} option has been set to 1 and @code{MXNIT*MXNJ} if it is
set to 2.
@item LSOFF
Set to a nonzero value to disable the linesearch algorithm (default is
0).
@item STPTOL
Minimum scaled step in linesearch algorithm (default is eps^(2/3)).
@item EPINIT
Swing factor in the Newton iteration convergence test.  The test is
applied to the residual vector, premultiplied by the approximate
Jacobian.  For convergence, the weighted RMS norm of this vector
(scaled by the error weights) must be less than @code{EPINIT*EPCON},
where @code{EPCON} = 0.33 is the analogous test constant used in the
time steps. The default is @code{EPINIT} = 0.01.
@end table
@item "print initial condition info"
Set this option to a nonzero value to display detailed information
about the initial condition calculation (default is 0).
@item "exclude algebraic variables from error test"
Set to a nonzero value to exclude algebraic variables from the error
test.  You must also set the @code{"algebraic variables"} option to
declare which variables in the problem are algebraic (default is 0).
@item "algebraic variables"
A vector of the same length as the state vector.  A nonzero element
indicates that the corresponding element of the state vector is an
algebraic variable (i.e., its derivative does not appear explicitly
in the equation set.

This option is required by the
@code{compute consistent initial condition"} and
@code{"exclude algebraic variables from error test"} options.
@item "enforce inequality constraints"
Set to one of the following values to enforce the inequality
constraints specified by the @code{"inequality constraint types"}
option (default is 0).

@enumerate
@item To have constraint checking only in the initial condition calculation.
@item To enforce constraint checking during the integration.
@item To enforce both options 1 and 2.
@end enumerate
@item "inequality constraint types"
A vector of the same length as the state specifying the type of
inequality constraint.  Each element of the vector corresponds to an
element of the state and should be assigned one of the following
codes 

@table @asis
@item -2
Less than zero.
@item -1
Less than or equal to zero.
@item 0
Not constrained.
@item 1
Greater than or equal to zero.
@item 2
Greater than zero.
@end table

This option only has an effect if the
@code{"enforce inequality constraints"} option is nonzero.
@item "initial step size"
Differential-algebraic problems may occaisionally suffer from severe
scaling difficulties on the first step.  If you know a great deal
about the scaling of your problem, you can help to alleviate this
problem by specifying an initial stepsize (default is computed
automatically).
@item "maximum order"
Restrict the maximum order of the solution method.  This option must
be between 1 and 5, inclusive (default is 5).
@item "maximum step size"
Setting the maximum stepsize will avoid passing over very large
regions (default is not specified).
@end table
@end deftypefn
daspk
-*- texinfo -*-
@deftypefn {Loadable Function} {[@var{x}, @var{xdot}, @var{istate}, @var{msg}] =} daspk (@var{fcn}, @var{x_0}, @var{xdot_0}, @var{t}, @var{t_crit})
Solve the set of differential-algebraic equations
@tex
$$ 0 = f (x, \dot{x}, t) $$
with
$$ x(t_0) = x_0, \dot{x}(t_0) = \dot{x}_0 $$
@end tex
@ifinfo

@example
0 = f (x, xdot, t)
@end example

with

@example
x(t_0) = x_0, xdot(t_0) = xdot_0
@end example

@end ifinfo
The solution is returned in the matrices @var{x} and @var{xdot},
with each row in the result matrices corresponding to one of the
elements in the vector @var{t}.  The first element of @var{t}
should be @math{t_0} and correspond to the initial state of the
system @var{x_0} and its derivative @var{xdot_0}, so that the first
row of the output @var{x} is @var{x_0} and the first row
of the output @var{xdot} is @var{xdot_0}.

The first argument, @var{fcn}, is a string or a two element cell array
of strings, inline or function handle, that names the function, to call
to compute the vector of residuals for the set of equations. It must
have the form

@example
@var{res} = f (@var{x}, @var{xdot}, @var{t})
@end example

@noindent
in which @var{x}, @var{xdot}, and @var{res} are vectors, and @var{t} is a
scalar.

If @var{fcn} is a two-element string array, the first element names
the function @math{f} described above, and the second element names
a function to compute the modified Jacobian
@tex
$$
J = {\partial f \over \partial x}
  + c {\partial f \over \partial \dot{x}}
$$
@end tex
@ifinfo

@example
      df       df
jac = -- + c ------
      dx     d xdot
@end example
@end ifinfo

The modified Jacobian function must have the form

@example

@var{jac} = j (@var{x}, @var{xdot}, @var{t}, @var{c})

@end example

The second and third arguments to @code{daspk} specify the initial
condition of the states and their derivatives, and the fourth argument
specifies a vector of output times at which the solution is desired,
including the time corresponding to the initial condition.

The set of initial states and derivatives are not strictly required to
be consistent.  If they are not consistent, you must use the
@code{daspk_options} function to provide additional information so
that @code{daspk} can compute a consistent starting point.

The fifth argument is optional, and may be used to specify a set of
times that the DAE solver should not integrate past.  It is useful for
avoiding difficulties with singularities and points where there is a
discontinuity in the derivative.

After a successful computation, the value of @var{istate} will be
greater than zero (consistent with the Fortran version of @sc{Daspk}).

If the computation is not successful, the value of @var{istate} will be
less than zero and @var{msg} will contain additional information.

You can use the function @code{daspk_options} to set optional
parameters for @code{daspk}.
@seealso{dassl}
@end deftypefn
dasrt_options
-*- texinfo -*-
@deftypefn {Loadable Function} {} dasrt_options (@var{opt}, @var{val})
When called with two arguments, this function
allows you set options parameters for the function @code{dasrt}.
Given one argument, @code{dasrt_options} returns the value of the
corresponding option.  If no arguments are supplied, the names of all
the available options and their current values are displayed.

Options include

@table @code
@item "absolute tolerance"
Absolute tolerance.  May be either vector or scalar.  If a vector, it
must match the dimension of the state vector, and the relative
tolerance must also be a vector of the same length.
@item "relative tolerance"
Relative tolerance.  May be either vector or scalar.  If a vector, it
must match the dimension of the state vector, and the absolute
tolerance must also be a vector of the same length.

The local error test applied at each integration step is
@example
  abs (local error in x(i)) <= rtol(i) * abs (Y(i)) + atol(i)
@end example
@item "initial step size"
Differential-algebraic problems may occaisionally suffer from severe
scaling difficulties on the first step.  If you know a great deal
about the scaling of your problem, you can help to alleviate this
problem by specifying an initial stepsize.
@item "maximum order"
Restrict the maximum order of the solution method.  This option must
be between 1 and 5, inclusive.
@item "maximum step size"
Setting the maximum stepsize will avoid passing over very large
regions.
@item "step limit"
Maximum number of integration steps to attempt on a single call to the
underlying Fortran code.
@end table
@end deftypefn
dasrt
-*- texinfo -*-
@deftypefn {Loadable Function} {[@var{x}, @var{xdot}, @var{t_out}, @var{istat}, @var{msg}] =} dasrt (@var{fcn} [, @var{g}], @var{x_0}, @var{xdot_0}, @var{t} [, @var{t_crit}])
Solve the set of differential-algebraic equations
@tex
$$ 0 = f (x, \dot{x}, t) $$
with
$$ x(t_0) = x_0, \dot{x}(t_0) = \dot{x}_0 $$
@end tex
@ifinfo

@example
0 = f (x, xdot, t)
@end example

with

@example
x(t_0) = x_0, xdot(t_0) = xdot_0
@end example

@end ifinfo
with functional stopping criteria (root solving).

The solution is returned in the matrices @var{x} and @var{xdot},
with each row in the result matrices corresponding to one of the
elements in the vector @var{t_out}.  The first element of @var{t}
should be @math{t_0} and correspond to the initial state of the
system @var{x_0} and its derivative @var{xdot_0}, so that the first
row of the output @var{x} is @var{x_0} and the first row
of the output @var{xdot} is @var{xdot_0}.

The vector @var{t} provides an upper limit on the length of the
integration.  If the stopping condition is met, the vector
@var{t_out} will be shorter than @var{t}, and the final element of
@var{t_out} will be the point at which the stopping condition was met,
and may not correspond to any element of the vector @var{t}.

The first argument, @var{fcn}, is a string, or cell array of strings or
inline or function handles, that names the function to call to compute
the vector of residuals for the set of equations. It must have the form

@example
@var{res} = f (@var{x}, @var{xdot}, @var{t})
@end example

@noindent
in which @var{x}, @var{xdot}, and @var{res} are vectors, and @var{t} is a
scalar.

If @var{fcn} is a two-element string array, or two element cell array,
the first element names the function @math{f} described above, and the
second element names a function to compute the modified Jacobian

@tex
$$
J = {\partial f \over \partial x}
  + c {\partial f \over \partial \dot{x}}
$$
@end tex
@ifinfo

@example
      df       df
jac = -- + c ------
      dx     d xdot
@end example

@end ifinfo

The modified Jacobian function must have the form

@example

@var{jac} = j (@var{x}, @var{xdot}, @var{t}, @var{c})

@end example

The optional second argument names a function that defines the
constraint functions whose roots are desired during the integration.
This function must have the form

@example
@var{g_out} = g (@var{x}, @var{t})
@end example

and return a vector of the constraint function values.
If the value of any of the constraint functions changes sign, @sc{Dasrt}
will attempt to stop the integration at the point of the sign change.

If the name of the constraint function is omitted, @code{dasrt} solves
the same problem as @code{daspk} or @code{dassl}.

Note that because of numerical errors in the constraint functions
due to roundoff and integration error, @sc{Dasrt} may return false
roots, or return the same root at two or more nearly equal values of
@var{T}.  If such false roots are suspected, the user should consider
smaller error tolerances or higher precision in the evaluation of the
constraint functions.

If a root of some constraint function defines the end of the problem,
the input to @sc{Dasrt} should nevertheless allow integration to a
point slightly past that root, so that @sc{Dasrt} can locate the root
by interpolation.

The third and fourth arguments to @code{dasrt} specify the initial
condition of the states and their derivatives, and the fourth argument
specifies a vector of output times at which the solution is desired,
including the time corresponding to the initial condition.

The set of initial states and derivatives are not strictly required to
be consistent.  In practice, however, @sc{Dassl} is not very good at
determining a consistent set for you, so it is best if you ensure that
the initial values result in the function evaluating to zero.

The sixth argument is optional, and may be used to specify a set of
times that the DAE solver should not integrate past.  It is useful for
avoiding difficulties with singularities and points where there is a
discontinuity in the derivative.

After a successful computation, the value of @var{istate} will be
greater than zero (consistent with the Fortran version of @sc{Dassl}).

If the computation is not successful, the value of @var{istate} will be
less than zero and @var{msg} will contain additional information.

You can use the function @code{dasrt_options} to set optional
parameters for @code{dasrt}.
@seealso{daspk, dasrt, lsode}
@end deftypefn
dassl_options
-*- texinfo -*-
@deftypefn {Loadable Function} {} dassl_options (@var{opt}, @var{val})
When called with two arguments, this function
allows you set options parameters for the function @code{dassl}.
Given one argument, @code{dassl_options} returns the value of the
corresponding option.  If no arguments are supplied, the names of all
the available options and their current values are displayed.

Options include

@table @code
@item "absolute tolerance"
Absolute tolerance.  May be either vector or scalar.  If a vector, it
must match the dimension of the state vector, and the relative
tolerance must also be a vector of the same length.
@item "relative tolerance"
Relative tolerance.  May be either vector or scalar.  If a vector, it
must match the dimension of the state vector, and the absolute
tolerance must also be a vector of the same length.

The local error test applied at each integration step is

@example
  abs (local error in x(i))
       <= rtol(i) * abs (Y(i)) + atol(i)
@end example
@item "compute consistent initial condition"
If nonzero, @code{dassl} will attempt to compute a consistent set of intial
conditions.  This is generally not reliable, so it is best to provide
a consistent set and leave this option set to zero.
@item "enforce nonnegativity constraints"
If you know that the solutions to your equations will always be
nonnegative, it may help to set this parameter to a nonzero
value.  However, it is probably best to try leaving this option set to
zero first, and only setting it to a nonzero value if that doesn't
work very well.
@item "initial step size"
Differential-algebraic problems may occaisionally suffer from severe
scaling difficulties on the first step.  If you know a great deal
about the scaling of your problem, you can help to alleviate this
problem by specifying an initial stepsize.
@item "maximum order"
Restrict the maximum order of the solution method.  This option must
be between 1 and 5, inclusive.
@item "maximum step size"
Setting the maximum stepsize will avoid passing over very large
regions  (default is not specified).
@item "step limit"
Maximum number of integration steps to attempt on a single call to the
underlying Fortran code.
@end table
@end deftypefn
dassl
-*- texinfo -*-
@deftypefn {Loadable Function} {[@var{x}, @var{xdot}, @var{istate}, @var{msg}] =} dassl (@var{fcn}, @var{x_0}, @var{xdot_0}, @var{t}, @var{t_crit})
Solve the set of differential-algebraic equations
@iftex
@tex
$$ 0 = f (x, \dot{x}, t) $$
with
$$ x(t_0) = x_0, \dot{x}(t_0) = \dot{x}_0 $$
@end tex
@end iftex
@ifinfo

@example
0 = f (x, xdot, t)
@end example

@noindent
with

@example
x(t_0) = x_0, xdot(t_0) = xdot_0
@end example

@end ifinfo
The solution is returned in the matrices @var{x} and @var{xdot},
with each row in the result matrices corresponding to one of the
elements in the vector @var{t}.  The first element of @var{t}
should be @math{t_0} and correspond to the initial state of the
system @var{x_0} and its derivative @var{xdot_0}, so that the first
row of the output @var{x} is @var{x_0} and the first row
of the output @var{xdot} is @var{xdot_0}.

The first argument, @var{fcn}, is a string or a two element cell array
of strings, inline or function handle, that names the function, to call
to compute the vector of residuals for the set of equations. It must
have the form

@example
@var{res} = f (@var{x}, @var{xdot}, @var{t})
@end example

@noindent
in which @var{x}, @var{xdot}, and @var{res} are vectors, and @var{t} is a
scalar.

If @var{fcn} is a two-element string array, the first element names
the function @math{f} described above, and the second element names
a function to compute the modified Jacobian

@iftex
@tex
$$
J = {\partial f \over \partial x}
  + c {\partial f \over \partial \dot{x}}
$$
@end tex
@end iftex
@ifinfo
@example
      df       df
jac = -- + c ------
      dx     d xdot
@end example
@end ifinfo

The modified Jacobian function must have the form

@example

@var{jac} = j (@var{x}, @var{xdot}, @var{t}, @var{c})

@end example

The second and third arguments to @code{dassl} specify the initial
condition of the states and their derivatives, and the fourth argument
specifies a vector of output times at which the solution is desired,
including the time corresponding to the initial condition.

The set of initial states and derivatives are not strictly required to
be consistent.  In practice, however, @sc{Dassl} is not very good at
determining a consistent set for you, so it is best if you ensure that
the initial values result in the function evaluating to zero.

The fifth argument is optional, and may be used to specify a set of
times that the DAE solver should not integrate past.  It is useful for
avoiding difficulties with singularities and points where there is a
discontinuity in the derivative.

After a successful computation, the value of @var{istate} will be
greater than zero (consistent with the Fortran version of @sc{Dassl}).

If the computation is not successful, the value of @var{istate} will be
less than zero and @var{msg} will contain additional information.

You can use the function @code{dassl_options} to set optional
parameters for @code{dassl}.
@seealso{daspk, dasrt, lsode}
@end deftypefn
all
-*- texinfo -*-
@deftypefn {Built-in Function} {} all (@var{x}, @var{dim})
The function @code{all} behaves like the function @code{any}, except
that it returns true only if all the elements of a vector, or all the
elements along dimension @var{dim} of a matrix, are nonzero.
@end deftypefn
any
-*- texinfo -*-
@deftypefn {Built-in Function} {} any (@var{x}, @var{dim})
For a vector argument, return 1 if any element of the vector is
nonzero.

For a matrix argument, return a row vector of ones and
zeros with each element indicating whether any of the elements of the
corresponding column of the matrix are nonzero.  For example,

@example
@group
any (eye (2, 4))
     @result{} [ 1, 1, 0, 0 ]
@end group
@end example

If the optional argument @var{dim} is supplied, work along dimension
@var{dim}.  For example,

@example
@group
any (eye (2, 4), 2)
     @result{} [ 1; 1 ]
@end group
@end example
@end deftypefn
atan2
-*- texinfo -*-
@deftypefn {Mapping Function} {} atan2 (@var{y}, @var{x})
Compute atan (@var{y} / @var{x}) for corresponding elements of @var{y}
and @var{x}.  The result is in range -pi to pi.
@end deftypefn
fmod
-*- texinfo -*-
@deftypefn {Mapping Function} {} fmod (@var{x}, @var{y})
Compute the floating point remainder of dividing @var{x} by @var{y}
using the C library function @code{fmod}.  The result has the same
sign as @var{x}.  If @var{y} is zero, the result implementation-defined.
@end deftypefn
cumprod
-*- texinfo -*-
@deftypefn {Built-in Function} {} cumprod (@var{x}, @var{dim})
Cumulative product of elements along dimension @var{dim}.  If
@var{dim} is omitted, it defaults to 1 (column-wise cumulative
products).

As a special case, if @var{x} is a vector and @var{dim} is omitted,
return the cumulative product of the elements as a vector with the
same orientation as @var{x}.
@end deftypefn
cumsum
-*- texinfo -*-
@deftypefn {Built-in Function} {} cumsum (@var{x}, @var{dim})
Cumulative sum of elements along dimension @var{dim}.  If @var{dim}
is omitted, it defaults to 1 (column-wise cumulative sums).

As a special case, if @var{x} is a vector and @var{dim} is omitted,
return the cumulative sum of the elements as a vector with the
same orientation as @var{x}.
@end deftypefn
diag
-*- texinfo -*-
@deftypefn {Built-in Function} {} diag (@var{v}, @var{k})
Return a diagonal matrix with vector @var{v} on diagonal @var{k}.  The
second argument is optional.  If it is positive, the vector is placed on
the @var{k}-th super-diagonal.  If it is negative, it is placed on the
@var{-k}-th sub-diagonal.  The default value of @var{k} is 0, and the
vector is placed on the main diagonal.  For example,

@example
@group
diag ([1, 2, 3], 1)
     @result{}  0  1  0  0
         0  0  2  0
         0  0  0  3
         0  0  0  0
@end group
@end example

@noindent
Given a matrix argument, instead of a vector, @code{diag} extracts the
@var{k}-th diagonal of the matrix.
@end deftypefn
prod
-*- texinfo -*-
@deftypefn {Built-in Function} {} prod (@var{x}, @var{dim})
Product of elements along dimension @var{dim}.  If @var{dim} is
omitted, it defaults to 1 (column-wise products).

As a special case, if @var{x} is a vector and @var{dim} is omitted,
return the product of the elements.
@end deftypefn
horzcat
-*- texinfo -*-
@deftypefn {Built-in Function} {} horzcat (@var{array1}, @var{array2}, @dots{}, @var{arrayN})
Return the horizontal concatenation of N-d array objects, @var{array1},
@var{array2}, @dots{}, @var{arrayN} along dimension 2.
@seealso{cat, vertcat}
@end deftypefn
vertcat
-*- texinfo -*-
@deftypefn {Built-in Function} {} vertcat (@var{array1}, @var{array2}, @dots{}, @var{arrayN})
Return the vertical concatenation of N-d array objects, @var{array1},
@var{array2}, @dots{}, @var{arrayN} along dimension 1.
@seealso{cat, horzcat}
@end deftypefn
cat
-*- texinfo -*-
@deftypefn {Built-in Function} {} cat (@var{dim}, @var{array1}, @var{array2}, @dots{}, @var{arrayN})
Return the concatenation of N-d array objects, @var{array1},
@var{array2}, @dots{}, @var{arrayN} along dimension @var{dim}.

@example
@group
A = ones (2, 2);
B = zeros (2, 2);
cat (2, A, B)
@result{} ans =

     1 1 0 0
     1 1 0 0
@end group
@end example

Alternatively, we can concatenate @var{A} and @var{B} along the
second dimension the following way:

@example
@group
[A, B].
@end group
@end example

@var{dim} can be larger than the dimensions of the N-d array objects
and the result will thus have @var{dim} dimensions as the
following example shows:
@example
@group
cat (4, ones(2, 2), zeros (2, 2))
@result{} ans =

   ans(:,:,1,1) =

     1 1
     1 1

   ans(:,:,1,2) =
     0 0
     0 0
@end group
@end example
@seealso{horzcat, vertcat}
@end deftypefn
permute
-*- texinfo -*-
@deftypefn {Built-in Function} {} permute (@var{a}, @var{perm})
Return the generalized transpose for an N-d array object @var{a}.
The permutation vector @var{perm} must contain the elements
@code{1:ndims(a)} (in any order, but each element must appear just once).
@seealso{ipermute}
@end deftypefn
ipermute
-*- texinfo -*-
@deftypefn {Built-in Function} {} ipermute (@var{a}, @var{iperm})
The inverse of the @code{permute} function.  The expression

@example
ipermute (permute (a, perm), perm)
@end example
returns the original array @var{a}.
@seealso{permute}
@end deftypefn
length
-*- texinfo -*-
@deftypefn {Built-in Function} {} length (@var{a})
Return the `length' of the object @var{a}.  For matrix objects, the
length is the number of rows or columns, whichever is greater (this
odd definition is used for compatibility with @sc{Matlab}).
@end deftypefn
ndims
-*- texinfo -*-
@deftypefn {Built-in Function} {} ndims (@var{a})
Returns the number of dimensions of array @var{a}.
For any array, the result will always be larger than or equal to 2.
Trailing singleton dimensions are not counted.
@end deftypefn
numel
-*- texinfo -*-
@deftypefn {Built-in Function} {} numel (@var{a})
Returns the number of elements in the object @var{a}.
@seealso{size}
@end deftypefn
size
-*- texinfo -*-
@deftypefn {Built-in Function} {} size (@var{a}, @var{n})
Return the number rows and columns of @var{a}.

With one input argument and one output argument, the result is returned
in a row vector.  If there are multiple output arguments, the number of
rows is assigned to the first, and the number of columns to the second,
etc.  For example,

@example
@group
size ([1, 2; 3, 4; 5, 6])
     @result{} [ 3, 2 ]

[nr, nc] = size ([1, 2; 3, 4; 5, 6])
     @result{} nr = 3
     @result{} nc = 2
@end group
@end example

If given a second argument, @code{size} will return the size of the
corresponding dimension.  For example

@example
size ([1, 2; 3, 4; 5, 6], 2)
     @result{} 2
@end example

@noindent
returns the number of columns in the given matrix.
@seealso{numel}
@end deftypefn
size_equal
-*- texinfo -*-
@deftypefn {Built-in Function} {} size_equal (@var{a}, @var{b}, @dots{})
Return true if the dimensions of all arguments agree.
Trailing singleton dimensions are ignored.
@seealso{size, numel}
@end deftypefn
nnz
-*- texinfo -*-
@deftypefn {Built-in Function} {@var{scalar} =} nnz (@var{a})
Returns the number of non zero elements in @var{a}.
@seealso{sparse}
@end deftypefn
nzmax
-*- texinfo -*-
@deftypefn {Built-in Function} {@var{scalar} =} nzmax (@var{SM})
Return the amount of storage allocated to the sparse matrix @var{SM}.
Note that Octave tends to crop unused memory at the first oppurtunity
for sparse objects. There are some cases of user created sparse objects
where the value returned by @dfn{nzmaz} will not be the same as @dfn{nnz},
but in general they will give the same result.
@seealso{sparse, spalloc}
@end deftypefn
rows
-*- texinfo -*-
@deftypefn {Built-in Function} {} rows (@var{a})
Return the number of rows of @var{a}.
@seealso{size, numel, columns, length, isscalar, isvector, ismatrix}
@end deftypefn
columns
-*- texinfo -*-
@deftypefn {Built-in Function} {} columns (@var{a})
Return the number of columns of @var{a}.
@seealso{size, numel, rows, length, isscalar, isvector, and ismatrix}
@end deftypefn
sum
-*- texinfo -*-
@deftypefn {Built-in Function} {} sum (@var{x}, @var{dim})
Sum of elements along dimension @var{dim}.  If @var{dim} is
omitted, it defaults to 1 (column-wise sum).

As a special case, if @var{x} is a vector and @var{dim} is omitted,
return the sum of the elements.
@end deftypefn
sumsq
-*- texinfo -*-
@deftypefn {Built-in Function} {} sumsq (@var{x}, @var{dim})
Sum of squares of elements along dimension @var{dim}.  If @var{dim}
is omitted, it defaults to 1 (column-wise sum of squares).

As a special case, if @var{x} is a vector and @var{dim} is omitted,
return the sum of squares of the elements.

This function is conceptually equivalent to computing
@example
sum (x .* conj (x), dim)
@end example
but it uses less memory and avoids calling conj if @var{x} is real.
@end deftypefn
islogical
-*- texinfo -*-
@deftypefn {Built-in Functio} {} islogical (@var{x})
Return true if @var{x} is a logical object.
@end deftypefn
isinteger
-*- texinfo -*-
@deftypefn {Built-in Function} {} isinteger (@var{x})
Return true if @var{x} is an integer object (int8, uint8, int16, etc.).
Note that @code{isinteger (14)} is false because numeric constants in
are double precision floating point values.
@seealso{isreal, isnumeric, class, isa}
@end deftypefn
iscomplex
-*- texinfo -*-
@deftypefn {Built-in Function} {} iscomplex (@var{x})
Return true if @var{x} is a complex-valued numeric object.
@end deftypefn
complex
-*- texinfo -*-
@deftypefn {Built-in Function} {} complex (@var{val})
@deftypefnx {Built-in Function} {} complex (@var{re}, @var{im})
Convert @var{x} to a complex value.
@end deftypefn
isreal
-*- texinfo -*-
@deftypefn {Built-in Function} {} isreal (@var{x})
Return true if @var{x} is a real-valued numeric object.
@end deftypefn
isempty
-*- texinfo -*-
@deftypefn {Built-in Function} {} isempty (@var{a})
Return 1 if @var{a} is an empty matrix (either the number of rows, or
the number of columns, or both are zero).  Otherwise, return 0.
@end deftypefn
isnumeric
-*- texinfo -*-
@deftypefn {Built-in Function} {} isnumeric (@var{x})
Return nonzero if @var{x} is a numeric object.
@end deftypefn
islist
-*- texinfo -*-
@deftypefn {Built-in Function} {} islist (@var{x})
Return nonzero if @var{x} is a list.
@end deftypefn
ismatrix
-*- texinfo -*-
@deftypefn {Built-in Function} {} ismatrix (@var{a})
Return 1 if @var{a} is a matrix.  Otherwise, return 0.
@end deftypefn
ones
-*- texinfo -*-
@deftypefn {Built-in Function} {} ones (@var{x})
@deftypefnx {Built-in Function} {} ones (@var{n}, @var{m})
@deftypefnx {Built-in Function} {} ones (@var{n}, @var{m}, @var{k}, @dots{})
@deftypefnx {Built-in Function} {} ones (@dots{}, @var{class})
Return a matrix or N-dimensional array whose elements are all 1.
The arguments are handled the same as the arguments for @code{eye}.

If you need to create a matrix whose values are all the same, you should
use an expression like

@example
val_matrix = val * ones (n, m)
@end example

The optional argument @var{class}, allows @code{ones} to return an array of
the specified type, for example

@example
val = ones (n,m, "uint8")
@end example
@end deftypefn
zeros
-*- texinfo -*-
@deftypefn {Built-in Function} {} zeros (@var{x})
@deftypefnx {Built-in Function} {} zeros (@var{n}, @var{m})
@deftypefnx {Built-in Function} {} zeros (@var{n}, @var{m}, @var{k}, @dots{})
@deftypefnx {Built-in Function} {} zeros (@dots{}, @var{class})
Return a matrix or N-dimensional array whose elements are all 0.
The arguments are handled the same as the arguments for @code{eye}.

The optional argument @var{class}, allows @code{zeros} to return an array of
the specified type, for example

@example
val = zeros (n,m, "uint8")
@end example
@end deftypefn
Inf
-*- texinfo -*-
@deftypefn {Built-in Function} {} Inf (@var{x})
@deftypefnx {Built-in Function} {} Inf (@var{n}, @var{m})
@deftypefnx {Built-in Function} {} Inf (@var{n}, @var{m}, @var{k}, @dots{})
@deftypefnx {Built-in Function} {} Inf (@dots{}, @var{class})
Return a matrix or N-dimensional array whose elements are all Infinity.
The arguments are handled the same as the arguments for @code{eye}.
The optional argument @var{class} may be either @samp{"single"} or
@samp{"double"}.  The default is @samp{"double"}.
@end deftypefn
NaN
-*- texinfo -*-
@deftypefn {Built-in Function} {} NaN (@var{x})
@deftypefnx {Built-in Function} {} NaN (@var{n}, @var{m})
@deftypefnx {Built-in Function} {} NaN (@var{n}, @var{m}, @var{k}, @dots{})
@deftypefnx {Built-in Function} {} NaN (@dots{}, @var{class})
Return a matrix or N-dimensional array whose elements are all NaN
(Not a Number).  The value NaN is the result of an operation like
@iftex
@tex
$0/0$, or $\infty - \infty$,
@end tex
@end iftex
@ifinfo
0/0, or @samp{Inf - Inf},
@end ifinfo
or any operation with a NaN.

Note that NaN always compares not equal to NaN.  This behavior is
specified by the IEEE standard for floating point arithmetic.  To
find NaN values, you must use the @code{isnan} function.

The arguments are handled the same as the arguments for @code{eye}.
The optional argument @var{class} may be either @samp{"single"} or
@samp{"double"}.  The default is @samp{"double"}.
@end deftypefn
e
-*- texinfo -*-
@deftypefn {Built-in Function} {} e (@var{x})
@deftypefnx {Built-in Function} {} e (@var{n}, @var{m})
@deftypefnx {Built-in Function} {} e (@var{n}, @var{m}, @var{k}, @dots{})
@deftypefnx {Built-in Function} {} e (@dots{}, @var{class})
Return a matrix or N-dimensional array whose elements are all equal
to the base of natural logarithms.  The constant
@iftex
@tex
 $e$
@end tex
@end iftex
@ifinfo
 @var{e}
@end ifinfo
 satisfies the equation
@iftex
@tex
 $\log (e) = 1$.
@end tex
@end iftex
@ifinfo
 @code{log} (@var{e}) = 1.
@end ifinfo
@end deftypefn
eps
-*- texinfo -*-
@deftypefn {Built-in Function} {} eps (@var{x})
@deftypefnx {Built-in Function} {} eps (@var{n}, @var{m})
@deftypefnx {Built-in Function} {} eps (@var{n}, @var{m}, @var{k}, @dots{})
@deftypefnx {Built-in Function} {} eps (@dots{}, @var{class})
Return a matrix or N-dimensional array whose elements are all eps,
the machine precision.  More precisely, @code{eps} is the largest
relative spacing between any two adjacent numbers in the machine's
floating point system.  This number is obviously system-dependent.  On
machines that support 64 bit IEEE floating point arithmetic, @code{eps}
is approximately
@ifinfo
 2.2204e-16.
@end ifinfo
@iftex
@tex
 $2.2204\times10^{-16}$.
@end tex
@end iftex
@end deftypefn
pi
-*- texinfo -*-
@deftypefn {Built-in Function} {} pi (@var{x})
@deftypefnx {Built-in Function} {} pi (@var{n}, @var{m})
@deftypefnx {Built-in Function} {} pi (@var{n}, @var{m}, @var{k}, @dots{})
@deftypefnx {Built-in Function} {} pi (@dots{}, @var{class})
Return a matrix or N-dimensional array whose elements are all equal
to the ratio of the circumference of a circle to its diameter.
Internally, @code{pi} is computed as @samp{4.0 * atan (1.0)}.
@end deftypefn
realmax
-*- texinfo -*-
@deftypefn {Built-in Function} {} realmax (@var{x})
@deftypefnx {Built-in Function} {} realmax (@var{n}, @var{m})
@deftypefnx {Built-in Function} {} realmax (@var{n}, @var{m}, @var{k}, @dots{})
@deftypefnx {Built-in Function} {} realmax (@dots{}, @var{class})
Return a matrix or N-dimensional array whose elements are all equal
to the largest floating point number that is representable.  The actual
value is system-dependent.  On machines that support 64-bit IEEE
floating point arithmetic, @code{realmax} is approximately
@ifinfo
 1.7977e+308
@end ifinfo
@iftex
@tex
 $1.7977\times10^{308}$.
@end tex
@end iftex
@seealso{realmin}
@end deftypefn
realmin
-*- texinfo -*-
@deftypefn {Built-in Function} {} realmin (@var{x})
@deftypefnx {Built-in Function} {} realmin (@var{n}, @var{m})
@deftypefnx {Built-in Function} {} realmin (@var{n}, @var{m}, @var{k}, @dots{})
@deftypefnx {Built-in Function} {} realmin (@dots{}, @var{class})
Return a matrix or N-dimensional array whose elements are all equal
to the smallest normalized floating point number that is representable.
The actual value is system-dependent.  On machines that support
64-bit IEEE floating point arithmetic, @code{realmin} is approximately
@ifinfo
 2.2251e-308
@end ifinfo
@iftex
@tex
 $2.2251\times10^{-308}$.
@end tex
@end iftex
@seealso{realmax}
@end deftypefn
I
-*- texinfo -*-
@deftypefn {Built-in Function} {} I (@var{x})
@deftypefnx {Built-in Function} {} I (@var{n}, @var{m})
@deftypefnx {Built-in Function} {} I (@var{n}, @var{m}, @var{k}, @dots{})
@deftypefnx {Built-in Function} {} I (@dots{}, @var{class})
Return a matrix or N-dimensional array whose elements are all equal
to the pure imaginary unit, defined as
@iftex
@tex
  $\sqrt{-1}$.
@end tex
@end iftex
@ifinfo
  @code{sqrt (-1)}.
@end ifinfo
Since I (also i, J, and J) is a function, you can use the name(s) for
other purposes.
@end deftypefn
NA
-*- texinfo -*-
@deftypefn {Built-in Function} {} NA (@var{x})
@deftypefnx {Built-in Function} {} NA (@var{n}, @var{m})
@deftypefnx {Built-in Function} {} NA (@var{n}, @var{m}, @var{k}, @dots{})
@deftypefnx {Built-in Function} {} NA (@dots{}, @var{class})
Return a matrix or N-dimensional array whose elements are all equal
to the special constant used to designate missing values.
@end deftypefn
false
-*- texinfo -*-
@deftypefn {Built-in Function} {} false (@var{x})
@deftypefnx {Built-in Function} {} false (@var{n}, @var{m})
@deftypefnx {Built-in Function} {} false (@var{n}, @var{m}, @var{k}, @dots{})
Return a matrix or N-dimensional array whose elements are all logical 0.
The arguments are handled the same as the arguments for @code{eye}.
@end deftypefn
true
-*- texinfo -*-
@deftypefn {Built-in Function} {} true (@var{x})
@deftypefnx {Built-in Function} {} true (@var{n}, @var{m})
@deftypefnx {Built-in Function} {} true (@var{n}, @var{m}, @var{k}, @dots{})
Return a matrix or N-dimensional array whose elements are all logical 1.
The arguments are handled the same as the arguments for @code{eye}.
@end deftypefn
eye
-*- texinfo -*-
@deftypefn {Built-in Function} {} eye (@var{x})
@deftypefnx {Built-in Function} {} eye (@var{n}, @var{m})
@deftypefnx {Built-in Function} {} eye (@dots{}, @var{class})
Return an identity matrix.  If invoked with a single scalar argument,
@code{eye} returns a square matrix with the dimension specified.  If you
supply two scalar arguments, @code{eye} takes them to be the number of
rows and columns.  If given a vector with two elements, @code{eye} uses
the values of the elements as the number of rows and columns,
respectively.  For example,

@example
@group
eye (3)
     @result{}  1  0  0
         0  1  0
         0  0  1
@end group
@end example

The following expressions all produce the same result:

@example
@group
eye (2)
@equiv{}
eye (2, 2)
@equiv{}
eye (size ([1, 2; 3, 4])
@end group
@end example

The optional argument @var{class}, allows @code{eye} to return an array of
the specified type, like

@example
val = zeros (n,m, "uint8")
@end example

Calling @code{eye} with no arguments is equivalent to calling it
with an argument of 1.  This odd definition is for compatibility
with @sc{Matlab}.
@end deftypefn
linspace
-*- texinfo -*-
@deftypefn {Built-in Function} {} linspace (@var{base}, @var{limit}, @var{n})
Return a row vector with @var{n} linearly spaced elements between
@var{base} and @var{limit}.  If the number of elements is greater than one,
then the @var{base} and @var{limit} are always included in
the range.  If @var{base} is greater than @var{limit}, the elements are
stored in decreasing order.  If the number of points is not specified, a
value of 100 is used.

The @code{linspace} function always returns a row vector.

For compatibility with @sc{Matlab}, return the second argument if
fewer than two values are requested.
@end deftypefn
resize
-*- texinfo -*-
@deftypefn {Built-in Function} {} resize (@var{x}, @var{m})
@deftypefnx {Built-in Function} {} resize (@var{x}, @var{m}, @var{n})
Destructively resize @var{x}.

@strong{Values in @var{x} are not preserved as they are with
@code{reshape}.}

If only @var{m} is supplied and it is a scalar, the dimension of the
result is @var{m}-by-@var{m}.  If @var{m} is a vector, then the
dimensions of the result are given by the elements of @var{m}.
If both @var{m} and @var{n} are scalars, then the dimensions of
the result are @var{m}-by-@var{n}.
@seealso{reshape}
@end deftypefn
reshape
-*- texinfo -*-
@deftypefn {Built-in Function} {} reshape (@var{a}, @var{m}, @var{n}, @dots{})
@deftypefnx {Built-in Function} {} reshape (@var{a}, @var{siz})
Return a matrix with the given dimensions whose elements are taken
from the matrix @var{a}.  The elements of the matrix are accessed in
column-major order (like Fortran arrays are stored).

For example,

@example
@group
reshape ([1, 2, 3, 4], 2, 2)
     @result{}  1  3
         2  4
@end group
@end example

@noindent
Note that the total number of elements in the original
matrix must match the total number of elements in the new matrix.

A single dimension of the return matrix can be unknown and is flagged
by an empty argument.
@end deftypefn
squeeze
-*- texinfo -*-
@deftypefn {Built-in Function} {} squeeze (@var{x})
Remove singleton dimensions from @var{x} and return the result.
@end deftypefn
__vnorm__
-*- texinfo -*-
@deftypefn {Built-in Function} {} __vnorm__ (@var{x}, @var{p})
Compute various norms of the vector @var{x}.
@end deftypefn
not
-*- texinfo -*-
@deftypefn {Built-in Function} {} not (@var{x})
This function is equivalent to @code{! x}.
@end deftypefn
uplus
-*- texinfo -*-
@deftypefn {Built-in Function} {} uplus (@var{x})
This function is equivalent to @code{+ x}.
@end deftypefn
uminus
-*- texinfo -*-
@deftypefn {Built-in Function} {} uminus (@var{x})
This function is equivalent to @code{- x}.
@end deftypefn
transpose
-*- texinfo -*-
@deftypefn {Built-in Function} {} transpose (@var{x})
This function is equivalent to @code{x.'}.
@end deftypefn
ctranspose
-*- texinfo -*-
@deftypefn {Built-in Function} {} ctranspose (@var{x})
This function is equivalent to @code{x'}.
@end deftypefn
plus
-*- texinfo -*-
@deftypefn {Built-in Function} {} plus (@var{x}, @var{y})
This function is equivalent to @code{x + y}.
@end deftypefn
minus
-*- texinfo -*-
@deftypefn {Built-in Function} {} minus (@var{x}, @var{y})
This function is equivalent to @code{x - y}.
@end deftypefn
mtimes
-*- texinfo -*-
@deftypefn {Built-in Function} {} mtimes (@var{x}, @var{y})
This function is equivalent to @code{x * y}.
@end deftypefn
mrdivide
-*- texinfo -*-
@deftypefn {Built-in Function} {} mrdivide (@var{x}, @var{y})
This function is equivalent to @code{x / y}.
@end deftypefn
mpower
-*- texinfo -*-
@deftypefn {Built-in Function} {} mpower (@var{x}, @var{y})
This function is equivalent to @code{x ^ y}.
@end deftypefn
mldivide
-*- texinfo -*-
@deftypefn {Built-in Function} {} mldivide (@var{x}, @var{y})
This function is equivalent to @code{x \ y}.
@end deftypefn
lt
-*- texinfo -*-
@deftypefn {Built-in Function} {} lt (@var{x}, @var{y})
This function is equivalent to @code{x < y}.
@end deftypefn
le
-*- texinfo -*-
@deftypefn {Built-in Function} {} le (@var{x}, @var{y})
This function is equivalent to @code{x <= y}.
@end deftypefn
eq
-*- texinfo -*-
@deftypefn {Built-in Function} {} eq (@var{x}, @var{y})
This function is equivalent to @code{x == y}.
@end deftypefn
ge
-*- texinfo -*-
@deftypefn {Built-in Function} {} ge (@var{x}, @var{y})
This function is equivalent to @code{x >= y}.
@end deftypefn
gt
-*- texinfo -*-
@deftypefn {Built-in Function} {} gt (@var{x}, @var{y})
This function is equivalent to @code{x > y}.
@end deftypefn
ne
-*- texinfo -*-
@deftypefn {Built-in Function} {} ne (@var{x}, @var{y})
This function is equivalent to @code{x != y}.
@end deftypefn
times
-*- texinfo -*-
@deftypefn {Built-in Function} {} times (@var{x}, @var{y})
This function is equivalent to @code{x .* y}.
@end deftypefn
rdivide
-*- texinfo -*-
@deftypefn {Built-in Function} {} rdivide (@var{x}, @var{y})
This function is equivalent to @code{x ./ y}.
@end deftypefn
power
-*- texinfo -*-
@deftypefn {Built-in Function} {} power (@var{x}, @var{y})
This function is equivalent to @code{x .\ y}.
@end deftypefn
ldivide
-*- texinfo -*-
@deftypefn {Built-in Function} {} ldivide (@var{x}, @var{y})
@end deftypefn
and
-*- texinfo -*-
@deftypefn {Built-in Function} {} and (@var{x}, @var{y})
This function is equivalent to @code{x & y}.
@end deftypefn
or
-*- texinfo -*-
@deftypefn {Built-in Function} {} or (@var{x}, @var{y})
This function is equivalent to @code{x | y}.
@end deftypefn
dbstop
-*- texinfo -*-
@deftypefn {Loadable Function} {rline =} dbstop (func, line, @dots{})
Set a breakpoint in a function
@table @code
@item func
String representing the function name.  When already in debug
mode this should be left out and only the line should be given.
@item line
Line you would like the breakpoint to be set on. Multiple
lines might be given as seperate arguments or as a vector.
@end table

The rline returned is the real line that the breakpoint was set at.
@seealso{dbclear, dbstatus, dbnext}
@end deftypefn
dbclear
-*- texinfo -*-
@deftypefn {Loadable Function} {} dbclear (func, line, @dots{})
Delete a breakpoint in a function
@table @code
@item func
String representing the function name.  When already in debug
mode this should be left out and only the line should be given.
@item line
Line where you would like to remove the breakpoint. Multiple
lines might be given as seperate arguments or as a vector.
@end table
No checking is done to make sure that the line you requested is really
a breakpoint. If you get the wrong line nothing will happen.
@seealso{dbstop, dbstatus, dbwhere}
@end deftypefn
dbstatus
-*- texinfo -*-
@deftypefn {Loadable Function} {lst =} dbstatus ([func])
Return a vector containing the lines on which a function has 
breakpoints set.
@table @code
@item func
String representing the function name.  When already in debug
mode this should be left out.
@end table
@seealso{dbclear, dbwhere}
@end deftypefn
dbwhere
-*- texinfo -*-
@deftypefn {Loadable Function} {} dbwhere ()
Show where we are in the code
@seealso{dbclear, dbstatus, dbstop}
@end deftypefn
dbtype
-*- texinfo -*-
@deftypefn {Loadable Function} {} dbtype ()
List script file with line numbers.
@seealso{dbclear, dbstatus, dbstop}
@end deftypefn
EDITOR
-*- texinfo -*-
@deftypefn {Built-in Function} {@var{val} =} EDITOR ()
@deftypefnx {Built-in Function} {@var{old_val} =} EDITOR (@var{new_val})
Query or set the internal variable that specifies the editor to
use with the @code{edit_history} command.  If the environment
variable @code{EDITOR} is set when Octave starts, its
value is used as the default.  Otherwise, @code{EDITOR} is set to
@code{"emacs"}.
@seealso{edit_history}
@end deftypefn
EXEC_PATH
-*- texinfo -*-
@deftypefn {Built-in Function} {@var{val} =} EXEC_PATH ()
@deftypefnx {Built-in Function} {@var{old_val} =} EXEC_PATH (@var{new_val})
Query or set the internal variable that specifies a colon separated
list of directories to search when executing external programs.
Its initial value is taken from the environment variable
@code{OCTAVE_EXEC_PATH} (if it exists) or @code{PATH}, but that
value can be overridden by the command line argument
@code{--exec-path PATH}.  At startup, an additional set of
directories (including the shell PATH) is appended to the path
specified in the environment or on the command line.  If you use
the @code{EXEC_PATH} function to modify the path, you should take
care to preserve these additional directories.
@end deftypefn
IMAGE_PATH
-*- texinfo -*-
@deftypefn {Built-in Function} {@var{val} =} IMAGE_PATH ()
@deftypefnx {Built-in Function} {@var{old_val} =} IMAGE_PATH (@var{new_val})
Query or set the internal variable that specifies a colon separated
list of directories in which to search for image files.
@end deftypefn
OCTAVE_HOME
-*- texinfo -*-
@deftypefn {Built-in Function} {} OCTAVE_HOME ()
Return the name of the top-level Octave installation directory.
@end deftypefn
OCTAVE_VERSION
-*- texinfo -*-
@deftypefn {Built-in Function} {} OCTAVE_VERSION ()
Return the version number of Octave, as a string.
@end deftypefn
print_usage
-*- texinfo -*-
@deftypefn {Loadable Function} {} print_usage ()
Print the usage message for the currently executing function.  The
@code{print_usage} function is only intended to work inside a
user-defined function.
@seealso{help}
@end deftypefn
det
-*- texinfo -*-
@deftypefn {Loadable Function} {[@var{d}, @var{rcond}] = } det (@var{a})
Compute the determinant of @var{a} using @sc{Lapack}.  Return an estimate
of the reciprocal condition number if requested.
@end deftypefn
cd
-*- texinfo -*-
@deffn {Command} cd dir
@deffnx {Command} chdir dir
Change the current working directory to @var{dir}.  If @var{dir} is
omitted, the current directory is changed to the users home
directory.  For example,

@example
cd ~/octave
@end example

@noindent
Changes the current working directory to @file{~/octave}.  If the
directory does not exist, an error message is printed and the working
directory is not changed.
@seealso{mkdir, rmdir, dir}
@end deffn
pwd
-*- texinfo -*-
@deftypefn {Built-in Function} {} pwd ()
Return the current working directory.
@seealso{dir, ls}
@end deftypefn
readdir
-*- texinfo -*-
@deftypefn {Built-in Function} {[@var{files}, @var{err}, @var{msg}] =} readdir (@var{dir})
Return names of the files in the directory @var{dir} as a cell array of
strings.  If an error occurs, return an empty cell array in @var{files}.

If successful, @var{err} is 0 and @var{msg} is an empty string.
Otherwise, @var{err} is nonzero and @var{msg} contains a
system-dependent error message.
@seealso{dir, glob}
@end deftypefn
mkdir
-*- texinfo -*-
@deftypefn {Built-in Function} {[@var{status}, @var{msg}, @var{msgid}] =} mkdir (@var{dir})
@deftypefnx {Built-in Function} {[@var{status}, @var{msg}, @var{msgid}] =} mkdir (@var{parent}, @var{dir})
Create a directory named @var{dir}.

If successful, @var{status} is 1, with @var{msg} and @var{msgid} empty
character strings.  Otherwise, @var{status} is 0, @var{msg} contains a
system-dependent error message, and @var{msgid} contains a unique
message identifier.
@seealso{rmdir}
@end deftypefn
rmdir
-*- texinfo -*-
@deftypefn {Built-in Function} {[@var{status}, @var{msg}, @var{msgid}] =} rmdir (@var{dir})
@deftypefnx {Built-in Function} {[@var{status}, @var{msg}, @var{msgid}] =} rmdir (@var{dir}, @code{"s"})
Remove the directory named @var{dir}.

If successful, @var{status} is 1, with @var{msg} and @var{msgid} empty
character strings.  Otherwise, @var{status} is 0, @var{msg} contains a
system-dependent error message, and @var{msgid} contains a unique
message identifier.

If the optional second parameter is suplied with value @code{"s"},
recursively remove all subdirectories as well.
@seealso{mkdir, confirm_recursive_rmdir}
@end deftypefn
link
-*- texinfo -*-
@deftypefn {Built-in Function} {[@var{err}, @var{msg}] =} link (@var{old}, @var{new})
Create a new link (also known as a hard link) to an existing file.

If successful, @var{err} is 0 and @var{msg} is an empty string.
Otherwise, @var{err} is nonzero and @var{msg} contains a
system-dependent error message.
@seealso{symlink}
@end deftypefn
symlink
-*- texinfo -*-
@deftypefn {Built-in Function} {[@var{err}, @var{msg}] =} symlink (@var{old}, @var{new})
Create a symbolic link @var{new} which contains the string @var{old}.

If successful, @var{err} is 0 and @var{msg} is an empty string.
Otherwise, @var{err} is nonzero and @var{msg} contains a
system-dependent error message.
@seealso{link, readlink}
@end deftypefn
readlink
-*- texinfo -*-
@deftypefn {Built-in Function} {[@var{result}, @var{err}, @var{msg}] =} readlink (@var{symlink})
Read the value of the symbolic link @var{symlink}.

If successful, @var{result} contains the contents of the symbolic link
@var{symlink}, @var{err} is 0 and @var{msg} is an empty string.
Otherwise, @var{err} is nonzero and @var{msg} contains a
system-dependent error message.
@seealso{link, symlink}
@end deftypefn
rename
-*- texinfo -*-
@deftypefn {Built-in Function} {[@var{err}, @var{msg}] =} rename (@var{old}, @var{new})
Change the name of file @var{old} to @var{new}.

If successful, @var{err} is 0 and @var{msg} is an empty string.
Otherwise, @var{err} is nonzero and @var{msg} contains a
system-dependent error message.
@seealso{ls, dir}
@end deftypefn
glob
-*- texinfo -*-
@deftypefn {Built-in Function} {} glob (@var{pattern})
Given an array of strings (as a char array or a cell array) in
@var{pattern}, return a cell array of file names that match any of
them, or an empty cell array if no patterns match.  Tilde expansion
is performed on each of the patterns before looking for matching file
names.  For example,

@example
@group
glob ("/vm*")
     @result{} "/vmlinuz"
@end group
@end example
@seealso{dir, ls, stat, readdir}
@end deftypefn
fnmatch
-*- texinfo -*-
@deftypefn {Built-in Function} {} fnmatch (@var{pattern}, @var{string})
Return 1 or zero for each element of @var{string} that matches any of
the elements of the string array @var{pattern}, using the rules of
filename pattern matching.  For example,

@example
@group
fnmatch ("a*b", @{"ab"; "axyzb"; "xyzab"@})
     @result{} [ 1; 1; 0 ]
@end group
@end example
@end deftypefn
filesep
-*- texinfo -*-
@deftypefn {Built-in Function} {} filesep ()
Return the system-dependent character used to separate directory names.
@seealso{pathsep, dir, ls}
@end deftypefn
pathsep
-*- texinfo -*-
@deftypefn {Built-in Function} {} pathsep ()
Return the system-dependent character used to separate directories in
a path.
@seealso{filesep, dir, ls}
@end deftypefn
confirm_recursive_rmdir
-*- texinfo -*-
@deftypefn {Built-in Function} {@var{val} =} confirm_recursive_rmdir ()
@deftypefnx {Built-in Function} {@var{old_val} =} confirm_recursive_rmdir (@var{new_val})
Query or set the internal variable that controls whether Octave
will ask for confirmation before recursively removing a directory tree.
@end deftypefn
builtin
-*- texinfo -*-
@deftypefn {Loadable Function} {[@dots{}]} builtin (@var{f}, @dots{})
Call the base function @var{f} even if @var{f} is overloaded to
some other function for the given type signature.
@seealso{dispatch}
@end deftypefn
dispatch
-*- texinfo -*-
@deftypefn {Loadable Function} {} dispatch (@var{f}, @var{r}, @var{type})

Replace the function @var{f} with a dispatch so that function @var{r}
is called when @var{f} is called with the first argument of the named
@var{type}. If the type is @var{any} then call @var{r} if no other type
matches.  The original function @var{f} is accessible using
@code{builtin (@var{f}, @dots{})}.

If @var{r} is omitted, clear dispatch function associated with @var{type}.

If both @var{r} and @var{type} are omitted, list dispatch functions
for @var{f}.
@seealso{builtin}
@end deftypefn
eig
-*- texinfo -*-
@deftypefn {Loadable Function} {@var{lambda} =} eig (@var{a})
@deftypefnx {Loadable Function} {[@var{v}, @var{lambda}] =} eig (@var{a})
The eigenvalues (and eigenvectors) of a matrix are computed in a several
step process which begins with a Hessenberg decomposition, followed by a
Schur decomposition, from which the eigenvalues are apparent.  The
eigenvectors, when desired, are computed by further manipulations of the
Schur decomposition.

The eigenvalues returned by @code{eig} are not ordered.
@end deftypefn
rethrow
-*- texinfo -*-
@deftypefn {Built-in Function} {} rethrow (@var{err})
Reissues a previous error as defined by @var{err}. @var{err} is a structure
that must contain at least the 'message' and 'identifier' fields. @var{err}
can also contain a field 'stack' that gives information on the assumed
location of the error. Typically @var{err} is returned from
@code{lasterror}.
@seealso{lasterror, lasterr, error}
@end deftypefn
error
-*- texinfo -*-
@deftypefn {Built-in Function} {} error (@var{template}, @dots{})
Format the optional arguments under the control of the template string
@var{template} using the same rules as the @code{printf} family of
functions (@pxref{Formatted Output}) and print the resulting message
on the @code{stderr} stream.  The message is prefixed by the character
string @samp{error: }.

Calling @code{error} also sets Octave's internal error state such that
control will return to the top level without evaluating any more
commands.  This is useful for aborting from functions or scripts.

If the error message does not end with a new line character, Octave will
print a traceback of all the function calls leading to the error.  For
example, given the following function definitions:

@example
@group
function f () g (); end
function g () h (); end
function h () nargin == 1 || error ("nargin != 1"); end
@end group
@end example

@noindent
calling the function @code{f} will result in a list of messages that
can help you to quickly locate the exact location of the error:

@example
@group
f ()
error: nargin != 1
error: evaluating index expression near line 1, column 30
error: evaluating binary operator `||' near line 1, column 27
error: called from `h'
error: called from `g'
error: called from `f'
@end group
@end example

If the error message ends in a new line character, Octave will print the
message but will not display any traceback messages as it returns
control to the top level.  For example, modifying the error message
in the previous example to end in a new line causes Octave to only print
a single message:

@example
@group
function h () nargin == 1 || error ("nargin != 1\n"); end
f ()
error: nargin != 1
@end group
@end example
@end deftypefn
warning
-*- texinfo -*-
@deftypefn {Built-in Function} {} warning (@var{template}, @dots{})
@deftypefnx {Built-in Function} {} warning (@var{id}, @var{template})
Format the optional arguments under the control of the template string
@var{template} using the same rules as the @code{printf} family of
functions (@pxref{Formatted Output}) and print the resulting message
on the @code{stderr} stream.  The message is prefixed by the character
string @samp{warning: }.
You should use this function when you want to notify the user
of an unusual condition, but only when it makes sense for your program
to go on.

The optional message identifier allows users to enable or disable
warnings tagged by @var{id}.  The special identifier @samp{"all"} may
be used to set the state of all warnings.

@deftypefnx {Built-in Function} {} warning ("on", @var{id})
@deftypefnx {Built-in Function} {} warning ("off", @var{id})
@deftypefnx {Built-in Function} {} warning ("error", @var{id})
@deftypefnx {Built-in Function} {} warning ("query", @var{id})
Set or query the state of a particular warning using the identifier
@var{id}.  If the identifier is omitted, a value of @samp{"all"} is
assumed.  If you set the state of a warning to @samp{"error"}, the
warning named by @var{id} is handled as if it were an error instead.
@seealso{warning_ids}
@end deftypefn
lasterror
-*- texinfo -*-
@deftypefn {Built-in Function} {@var{err} =} lasterror (@var{err})
@deftypefnx {Built-in Function} {} lasterror ('reset')
Returns or sets the last error message. Called without any arguments
returns a structure containing the last error message, as well as other
information related to this error. The elements of this structure are:

@table @asis
@item 'message'
The text of the last error message
@item 'identifier'
The message identifier of this error message
@item 'stack'
A structure containing information on where the message occured. This might
be an empty structure if this in the case where this information can not
be obtained. The fields of this structure are:

@table @asis
@item 'file'
The name of the file where the error occurred
@item 'name'
The name of function in which the error occured
@item 'line'
The line number at which the error occured
@item 'column'
An optional field with the column number at which the error occurred
@end table
@end table

The @var{err} structure may also be passed to @code{lasterror} to set the
information about the last error. The only constraint on @var{err} in that
case is that it is a scalar structure. Any fields of @var{err} that match
the above are set to the value passed in @var{err}, while other fields are
set to their default values.

If @code{lasterror} is called with the argument 'reset', all values take
their default values.
@end deftypefn
lasterr
-*- texinfo -*-
@deftypefn {Built-in Function} {[@var{msg}, @var{msgid}] =} lasterr (@var{msg}, @var{msgid})
Without any arguments, return the last error message.  With one
argument, set the last error message to @var{msg}.  With two arguments,
also set the last message identifier.
@end deftypefn
lastwarn
-*- texinfo -*-
@deftypefn {Built-in Function} {[@var{msg}, @var{msgid}] =} lastwarn (@var{msg}, @var{msgid})
Without any arguments, return the last warning message.  With one
argument, set the last warning message to @var{msg}.  With two arguments,
also set the last message identifier.
@end deftypefn
usage
-*- texinfo -*-
@deftypefn {Built-in Function} {} usage (@var{msg})
Print the message @var{msg}, prefixed by the string @samp{usage: }, and
set Octave's internal error state such that control will return to the
top level without evaluating any more commands.  This is useful for
aborting from functions.

After @code{usage} is evaluated, Octave will print a traceback of all
the function calls leading to the usage message.

You should use this function for reporting problems errors that result
from an improper call to a function, such as calling a function with an
incorrect number of arguments, or with arguments of the wrong type.  For
example, most functions distributed with Octave begin with code like
this

@example
@group
if (nargin != 2)
  usage ("foo (a, b)");
endif
@end group
@end example

@noindent
to check for the proper number of arguments.
@end deftypefn
beep_on_error
-*- texinfo -*-
@deftypefn {Built-in Function} {@var{val} =} beep_on_error ()
@deftypefnx {Built-in Function} {@var{old_val} =} beep_on_error (@var{new_val})
Query or set the internal variable that controls whether Octave will try
to ring the terminal bell before printing an error message.
@end deftypefn
debug_on_error
-*- texinfo -*-
@deftypefn {Built-in Function} {@var{val} =} debug_on_error ()
@deftypefnx {Built-in Function} {@var{old_val} =} debug_on_error (@var{new_val})
Query or set the internal variable that controls whether Octave will try
to enter the debugger when an error is encountered.  This will also
inhibit printing of the normal traceback message (you will only see
the top-level error message).
@end deftypefn
debug_on_warning
-*- texinfo -*-
@deftypefn {Built-in Function} {@var{val} =} debug_on_warning ()
@deftypefnx {Built-in Function} {@var{old_val} =} debug_on_warning (@var{new_val})
Query or set the internal variable that controls whether Octave will try
to enter the debugger when a warning is encountered.
@end deftypefn
expm
-*- texinfo -*-
@deftypefn {Loadable Function} {} expm (@var{a})
Return the exponential of a matrix, defined as the infinite Taylor
series
@iftex
@tex
$$
 \exp (A) = I + A + {A^2 \over 2!} + {A^3 \over 3!} + \cdots
$$
@end tex
@end iftex
@ifinfo

@example
expm(a) = I + a + a^2/2! + a^3/3! + ...
@end example

@end ifinfo
The Taylor series is @emph{not} the way to compute the matrix
exponential; see Moler and Van Loan, @cite{Nineteen Dubious Ways to
Compute the Exponential of a Matrix}, SIAM Review, 1978.  This routine
uses Ward's diagonal
@iftex
@tex
Pad\'e
@end tex
@end iftex
@ifinfo
Pade'
@end ifinfo
approximation method with three step preconditioning (SIAM Journal on
Numerical Analysis, 1977).  Diagonal
@iftex
@tex
Pad\'e
@end tex
@end iftex
@ifinfo
Pade'
@end ifinfo
 approximations are rational polynomials of matrices
@iftex
@tex
$D_q(a)^{-1}N_q(a)$
@end tex
@end iftex
@ifinfo

@example
     -1
D (a)   N (a)
@end example

@end ifinfo
 whose Taylor series matches the first
@iftex
@tex
$2 q + 1 $
@end tex
@end iftex
@ifinfo
@code{2q+1}
@end ifinfo
terms of the Taylor series above; direct evaluation of the Taylor series
(with the same preconditioning steps) may be desirable in lieu of the
@iftex
@tex
Pad\'e
@end tex
@end iftex
@ifinfo
Pade'
@end ifinfo
approximation when
@iftex
@tex
$D_q(a)$
@end tex
@end iftex
@ifinfo
@code{Dq(a)}
@end ifinfo
is ill-conditioned.
@end deftypefn
fft
-*- texinfo -*-
@deftypefn {Loadable Function} {} fft (@var{a}, @var{n}, @var{dim})
Compute the FFT of @var{a} using subroutines from
@sc{Fftw}. The FFT is calculated along the first non-singleton dimension of the
array. Thus if @var{a} is a matrix, @code{fft (@var{a})} computes the
FFT for each column of @var{a}.

If called with two arguments, @var{n} is expected to be an integer
specifying the number of elements of @var{a} to use, or an empty
matrix to specify that its value should be ignored. If @var{n} is
larger than the dimension along which the FFT is calculated, then
@var{a} is resized and padded with zeros. Otherwise, if @var{n} is
smaller than the dimension along which the FFT is calculated, then
@var{a} is truncated.

If called with three arguments, @var{dim} is an integer specifying the
dimension of the matrix along which the FFT is performed
@seealso{ifft, fft2, fftn, fftw_wisdom}
@end deftypefn
ifft
-*- texinfo -*-
@deftypefn {Loadable Function} {} ifft (@var{a}, @var{n}, @var{dim})
Compute the inverse FFT of @var{a} using subroutines from
@sc{Fftw}. The inverse FFT is calculated along the first non-singleton dimension
of the array. Thus if @var{a} is a matrix, @code{fft (@var{a})} computes
the inverse FFT for each column of @var{a}.

If called with two arguments, @var{n} is expected to be an integer
specifying the number of elements of @var{a} to use, or an empty
matrix to specify that its value should be ignored. If @var{n} is
larger than the dimension along which the inverse FFT is calculated, then
@var{a} is resized and padded with zeros. Otherwise, if@var{n} is
smaller than the dimension along which the inverse FFT is calculated,
then @var{a} is truncated.

If called with three agruments, @var{dim} is an integer specifying the
dimension of the matrix along which the inverse FFT is performed
@seealso{fft, ifft2, ifftn, fftw_wisdom}
@end deftypefn
fft2
-*- texinfo -*-
@deftypefn {Loadable Function} {} fft2 (@var{a}, @var{n}, @var{m})
Compute the two dimensional FFT of @var{a} using subroutines from
@sc{Fftw}. The optional arguments @var{n} and @var{m} may be used specify the
number of rows and columns of @var{a} to use.  If either of these is
larger than the size of @var{a}, @var{a} is resized and padded with
zeros.

If @var{a} is a multi-dimensional matrix, each two-dimensional sub-matrix
of @var{a} is treated seperately
@seealso {ifft2, fft, fftn, fftw_wisdom}
@end deftypefn
ifft2
-*- texinfo -*-
@deftypefn {Loadable Function} {} fft2 (@var{a}, @var{n}, @var{m})
Compute the inverse two dimensional FFT of @var{a} using subroutines from
@sc{Fftw}. The optional arguments @var{n} and @var{m} may be used specify the
number of rows and columns of @var{a} to use.  If either of these is
larger than the size of @var{a}, @var{a} is resized and padded with
zeros.

If @var{a} is a multi-dimensional matrix, each two-dimensional sub-matrix
of @var{a} is treated seperately
@seealso {fft2, ifft, ifftn, fftw_wisdom}
@end deftypefn
fftn
-*- texinfo -*-
@deftypefn {Loadable Function} {} fftn (@var{a}, @var{size})
Compute the N dimensional FFT of @var{a} using subroutines from
@sc{Fftw}. The optional vector argument @var{size} may be used specify the
dimensions of the array to be used. If an element of @var{size} is
smaller than the corresponding dimension, then the dimension is
truncated prior to performing the FFT. Otherwise if an element
of @var{size} is larger than the corresponding dimension @var{a}
is resized and padded with zeros.
@seealso {ifftn, fft, fft2, fftw_wisdom}
@end deftypefn
ifftn
-*- texinfo -*-
@deftypefn {Loadable Function} {} ifftn (@var{a}, @var{size})
Compute the invesre N dimensional FFT of @var{a} using subroutines from
@sc{Fftw}. The optional vector argument @var{size} may be used specify the
dimensions of the array to be used. If an element of @var{size} is
smaller than the corresponding dimension, then the dimension is
truncated prior to performing the inverse FFT. Otherwise if an element
of @var{size} is larger than the corresponding dimension @var{a}
is resized and padded with zeros.
@seealso {fftn, ifft, ifft2, fftw_wisdom}
@end deftypefn
fftw
-*- texinfo -*-
@deftypefn {Loadable Function} {@var{method} =} fftw ('planner')
@deftypefnx {Loadable Function} {} fftw ('planner', @var{method})
@deftypefnx {Loadable Function} {@var{wisdom} =} fftw ('dwisdom')
@deftypefnx {Loadable Function} {@var{wisdom} =} fftw ('dwisdom', @var{wisdom})

Manage FFTW wisdom data. Wisdom data can be used to significantly
accelerate the calculation of the FFTs but implies a initial cost
in its calculation. The wisdom used by Octave can be imported directly,
usually from a file /etc/fftw/wisdom, or @dfn{fftw} can be used
to import wisdom. For example

@example
@var{wisdom} = fftw ('dwisdom')
@end example

will save the existing wisdom used by Octave to the string @var{wisdom}.
This string can then be saved in the usual manner. This existing wisdom
can be reimported as follows

@example
fftw ('dwisdom', @var{wisdom})
@end example 

If @var{wisdom} is an empty matrix, then the wisdom used is cleared.

During the calculation of fourier transforms further wisdom is generated.
The fashion in which this wisdom is generated is equally controlled by
the @dfn{fftw} function. There are five different manners in which the
wisdom can be treated, these being

@table @asis
@item 'estimate'
This specifies that no run-time measurement of the optimal means of
calculating a particular is performed, and a simple heuristic is used
to pick a (probably sub-optimal) plan. The advantage of this method is
that there is little or no overhead in the generation of the plan, which
is appropriate for a fourier transform that will be calculated once.

@item 'measure'
In this case a range of algorithms to perform the transform is considered
and the best is selected based on their execution time.

@item 'patient'
This is like 'measure', but a wider range of algorithms is considered.

@item 'exhasutive'
This is like 'meaure', but all possible algorithms that may be used to
treat the transform are considered.

@item 'hybrid'
As run-time measurement of the algorithm can be expensive, this is a
compromise where 'measure' is used for transforms upto the size of 8192
and beyond that the 'estimate' method is used.
@end table

The default method is 'estimate', and the method currently being used can
be probed with

@example
@var{method} = fftw ('planner')
@end example

and the method used can be set using

@example
fftw ('planner', @var{method})
@end example

Note that calculated wisdom will be lost when restarting Octave. However,
the wisdom data can be reloaded if it is saved to a file as described
above.  Also, any system-wide wisdom file that has been found will
also be used. Saved wisdom files should not be used on different
platforms since they will not be efficient and the point of calculating
the wisdom is lost.
@seealso{fft, ifft, fft2, ifft2, fftn, ifftn}
@end deftypefn
fclose
-*- texinfo -*-
@deftypefn {Built-in Function} {} fclose (@var{fid})
Closes the specified file.  If successful, @code{fclose} returns 0,
otherwise, it returns -1.
@seealso{fopen, fseek, ftell}
@end deftypefn
fclear
-*- texinfo -*-
@deftypefn {Built-in Function} {} fclear (@var{fid})
Clear the stream state for the specified file.
@end deftypefn
fflush
-*- texinfo -*-
@deftypefn {Built-in Function} {} fflush (@var{fid})
Flush output to @var{fid}.  This is useful for ensuring that all
pending output makes it to the screen before some other event occurs.
For example, it is always a good idea to flush the standard output
stream before calling @code{input}.

@code{fflush} returns 0 on success and an OS dependent error value
(@minus{}1 on unix) on error.
@seealso{fopen, fclose}
@end deftypefn
fgetl
-*- texinfo -*-
@deftypefn {Built-in Function} {} fgetl (@var{fid}, @var{len})
Read characters from a file, stopping after a newline, or EOF,
or @var{len} characters have been read.  The characters read, excluding
the possible trailing newline, are returned as a string.

If @var{len} is omitted, @code{fgetl} reads until the next newline
character.

If there are no more characters to read, @code{fgetl} returns @minus{}1.
@seealso{fread, fscanf}
@end deftypefn
fgets
-*- texinfo -*-
@deftypefn {Built-in Function} {} fgets (@var{fid}, @var{len})
Read characters from a file, stopping after a newline, or EOF,
or @var{len} characters have been read.  The characters read, including
the possible trailing newline, are returned as a string.

If @var{len} is omitted, @code{fgets} reads until the next newline
character.

If there are no more characters to read, @code{fgets} returns @minus{}1.
@seealso{fread, fscanf}
@end deftypefn
fopen
-*- texinfo -*-
@deftypefn {Built-in Function} {[@var{fid}, @var{msg}] =} fopen (@var{name}, @var{mode}, @var{arch})
@deftypefnx {Built-in Function} {@var{fid_list} =} fopen ("all")
@deftypefnx {Built-in Function} {[@var{file}, @var{mode}, @var{arch}] =} fopen (@var{fid})
The first form of the @code{fopen} function opens the named file with
the specified mode (read-write, read-only, etc.) and architecture
interpretation (IEEE big endian, IEEE little endian, etc.), and returns
an integer value that may be used to refer to the file later.  If an
error occurs, @var{fid} is set to @minus{}1 and @var{msg} contains the
corresponding system error message.  The @var{mode} is a one or two
character string that specifies whether the file is to be opened for
reading, writing, or both.

The second form of the @code{fopen} function returns a vector of file ids
corresponding to all the currently open files, excluding the
@code{stdin}, @code{stdout}, and @code{stderr} streams.

The third form of the @code{fopen} function returns information about the
open file given its file id.

For example,

@example
myfile = fopen ("splat.dat", "r", "ieee-le");
@end example

@noindent
opens the file @file{splat.dat} for reading.  If necessary, binary
numeric values will be read assuming they are stored in IEEE format with
the least significant bit first, and then converted to the native
representation.

Opening a file that is already open simply opens it again and returns a
separate file id.  It is not an error to open a file several times,
though writing to the same file through several different file ids may
produce unexpected results.

The possible values @samp{mode} may have are

@table @asis
@item @samp{r}
Open a file for reading.

@item @samp{w}
Open a file for writing.  The previous contents are discared.

@item @samp{a}
Open or create a file for writing at the end of the file.

@item @samp{r+}
Open an existing file for reading and writing.

@item @samp{w+}
Open a file for reading or writing.  The previous contents are
discarded.

@item @samp{a+}
Open or create a file for reading or writing at the end of the
file.
@end table

Append a "t" to the mode string to open the file in text mode or a
"b" to open in binary mode.  On Windows and Macintosh systems, text
mode reading and writing automatically converts linefeeds to the
appropriate line end character for the system (carriage-return linefeed
on Windows, carriage-return on Macintosh).  The default if no mode is
specified is binary mode.

Additionally, you may append a "z" to the mode string to open a
gzipped file for reading or writing.  For this to be successful, you
must also open the file in binary mode.

The parameter @var{arch} is a string specifying the default data format
for the file.  Valid values for @var{arch} are:

@table @asis
@samp{native}
The format of the current machine (this is the default).

@samp{ieee-be}
IEEE big endian format.

@samp{ieee-le}
IEEE little endian format.

@samp{vaxd}
VAX D floating format.

@samp{vaxg}
VAX G floating format.

@samp{cray}
Cray floating format.
@end table

@noindent
however, conversions are currently only supported for @samp{native}
@samp{ieee-be}, and @samp{ieee-le} formats.
@seealso{fclose, fread, fseek}
@end deftypefn
freport
-*- texinfo -*-
@deftypefn {Built-in Function} {} freport ()
Print a list of which files have been opened, and whether they are open
for reading, writing, or both.  For example,

@example
@group
freport ()

     @print{}  number  mode  name
     @print{} 
     @print{}       0     r  stdin
     @print{}       1     w  stdout
     @print{}       2     w  stderr
     @print{}       3     r  myfile
@end group
@end example
@end deftypefn
frewind
-*- texinfo -*-
@deftypefn {Built-in Function} {} frewind (@var{fid})
Move the file pointer to the beginning of the file @var{fid}, returning
0 for success, and -1 if an error was encountered.  It is equivalent to
@code{fseek (@var{fid}, 0, SEEK_SET)}.
@end deftypefn
fseek
-*- texinfo -*-
@deftypefn {Built-in Function} {} fseek (@var{fid}, @var{offset}, @var{origin})
Set the file pointer to any location within the file @var{fid}.

The pointer is positioned @var{offset} characters from the @var{origin},
which may be one of the predefined variables @code{SEEK_CUR} (current
position), @code{SEEK_SET} (beginning), or @code{SEEK_END} (end of
file) or strings "cof", "bof" or "eof". If @var{origin} is omitted,
@code{SEEK_SET} is assumed.  The offset must be zero, or a value returned
by @code{ftell} (in which case @var{origin} must be @code{SEEK_SET}).

Return 0 on success and -1 on error.
@seealso{ftell, fopen, fclose}
@end deftypefn
ftell
-*- texinfo -*-
@deftypefn {Built-in Function} {} ftell (@var{fid})
Return the position of the file pointer as the number of characters
from the beginning of the file @var{fid}.
@seealso{fseek, fopen, fclose}
@end deftypefn
fprintf
-*- texinfo -*-
@deftypefn {Built-in Function} {} fprintf (@var{fid}, @var{template}, @dots{})
This function is just like @code{printf}, except that the output is
written to the stream @var{fid} instead of @code{stdout}.
@seealso{printf, sprintf, fread, fscanf, fopen, fclose}
@end deftypefn
printf
-*- texinfo -*-
@deftypefn {Built-in Function} {} printf (@var{template}, @dots{})
Print optional arguments under the control of the template string
@var{template} to the stream @code{stdout} and return the number of
characters printed.
@ifclear OCTAVE_MANUAL

See the Formatted Output section of the GNU Octave manual for a
complete description of the syntax of the template string.
@end ifclear
@seealso{fprintf, sprintf, scanf}
@end deftypefn
fputs
-*- texinfo -*-
@deftypefn {Built-in Function} {} fputs (@var{fid}, @var{string})
Write a string to a file with no formatting.

Return a non-negative number on success and EOF on error.
@end deftypefn
puts
-*- texinfo -*-
@deftypefn {Built-in Function} {} puts (@var{string})
Write a string to the standard output with no formatting.

Return a non-negative number on success and EOF on error.
@end deftypefn
sprintf
-*- texinfo -*-
@deftypefn {Built-in Function} {} sprintf (@var{template}, @dots{})
This is like @code{printf}, except that the output is returned as a
string.  Unlike the C library function, which requires you to provide a
suitably sized string as an argument, Octave's @code{sprintf} function
returns the string, automatically sized to hold all of the items
converted.
@seealso{printf, fprintf, sscanf}
@end deftypefn
fscanf
-*- texinfo -*-
@deftypefn {Built-in Function} {[@var{val}, @var{count}] =} fscanf (@var{fid}, @var{template}, @var{size})
@deftypefnx {Built-in Function} {[@var{v1}, @var{v2}, @dots{}, @var{count}] = } fscanf (@var{fid}, @var{template}, "C")
In the first form, read from @var{fid} according to @var{template},
returning the result in the matrix @var{val}.

The optional argument @var{size} specifies the amount of data to read
and may be one of

@table @code
@item Inf
Read as much as possible, returning a column vector.

@item @var{nr}
Read up to @var{nr} elements, returning a column vector.

@item [@var{nr}, Inf]
Read as much as possible, returning a matrix with @var{nr} rows.  If the
number of elements read is not an exact multiple of @var{nr}, the last
column is padded with zeros.

@item [@var{nr}, @var{nc}]
Read up to @code{@var{nr} * @var{nc}} elements, returning a matrix with
@var{nr} rows.  If the number of elements read is not an exact multiple
of @var{nr}, the last column is padded with zeros.
@end table

@noindent
If @var{size} is omitted, a value of @code{Inf} is assumed.

A string is returned if @var{template} specifies only character
conversions.

The number of items successfully read is returned in @var{count}.

In the second form, read from @var{fid} according to @var{template},
with each conversion specifier in @var{template} corresponding to a
single scalar return value.  This form is more `C-like', and also
compatible with previous versions of Octave.  The number of successful
conversions is returned in @var{count}
@ifclear OCTAVE_MANUAL

See the Formatted Input section of the GNU Octave manual for a
complete description of the syntax of the template string.
@end ifclear
@seealso{scanf, sscanf, fread, fprintf}
@end deftypefn
sscanf
-*- texinfo -*-
@deftypefn {Built-in Function} {[@var{val}, @var{count}] =} sscanf (@var{string}, @var{template}, @var{size})
@deftypefnx {Built-in Function} {[@var{v1}, @var{v2}, @dots{}, @var{count}] = } sscanf (@var{string}, @var{template}, "C")
This is like @code{fscanf}, except that the characters are taken from the
string @var{string} instead of from a stream.  Reaching the end of the
string is treated as an end-of-file condition.
@seealso{fscanf, scanf, sprintf}
@end deftypefn
scanf
-*- texinfo -*-
@deftypefn {Built-in Function} {[@var{val}, @var{count}] =} scanf (@var{template}, @var{size})
@deftypefnx {Built-in Function} {[@var{v1}, @var{v2}, @dots{}, @var{count}]] = } scanf (@var{template}, "C")
This is equivalent to calling @code{fscanf} with @var{fid} = @code{stdin}.

It is currently not useful to call @code{scanf} in interactive
programs.
@seealso{fscanf, sscanf, printf}
@end deftypefn
fread
-*- texinfo -*-
@deftypefn {Built-in Function} {[@var{val}, @var{count}] =} fread (@var{fid}, @var{size}, @var{precision}, @var{skip}, @var{arch})
Read binary data of type @var{precision} from the specified file ID
@var{fid}.

The optional argument @var{size} specifies the amount of data to read
and may be one of

@table @code
@item Inf
Read as much as possible, returning a column vector.

@item @var{nr}
Read up to @var{nr} elements, returning a column vector.

@item [@var{nr}, Inf]
Read as much as possible, returning a matrix with @var{nr} rows.  If the
number of elements read is not an exact multiple of @var{nr}, the last
column is padded with zeros.

@item [@var{nr}, @var{nc}]
Read up to @code{@var{nr} * @var{nc}} elements, returning a matrix with
@var{nr} rows.  If the number of elements read is not an exact multiple
of @var{nr}, the last column is padded with zeros.
@end table

@noindent
If @var{size} is omitted, a value of @code{Inf} is assumed.

The optional argument @var{precision} is a string specifying the type of
data to read and may be one of

@table @code
@item "schar"
@itemx "signed char"
Signed character.

@item "uchar"
@itemx "unsigned char"
Unsigned character.

@item "int8"
@itemx "integer*1"

8-bit signed integer.

@item "int16"
@itemx "integer*2"
16-bit signed integer.

@item "int32"
@itemx "integer*4"
32-bit signed integer.

@item "int64"
@itemx "integer*8"
64-bit signed integer.

@item "uint8"
8-bit unsigned integer.

@item "uint16"
16-bit unsigned integer.

@item "uint32"
32-bit unsigned integer.

@item "uint64"
64-bit unsigned integer.

@item "single"
@itemx "float32"
@itemx "real*4"
32-bit floating point number.

@item "double"
@itemx "float64"
@itemx "real*8"
64-bit floating point number.

@item "char"
@itemx "char*1"
Single character.

@item "short"
Short integer (size is platform dependent).

@item "int"
Integer (size is platform dependent).

@item "long"
Long integer (size is platform dependent).

@item "ushort"
@itemx "unsigned short"
Unsigned short integer (size is platform dependent).

@item "uint"
@itemx "unsigned int"
Unsigned integer (size is platform dependent).

@item "ulong"
@itemx "unsigned long"
Unsigned long integer (size is platform dependent).

@item "float"
Single precision floating point number (size is platform dependent).
@end table

@noindent
The default precision is @code{"uchar"}.

The @var{precision} argument may also specify an optional repeat
count.  For example, @samp{32*single} causes @code{fread} to read
a block of 32 single precision floating point numbers.  Reading in
blocks is useful in combination with the @var{skip} argument.

The @var{precision} argument may also specify a type conversion.
For example, @samp{int16=>int32} causes @code{fread} to read 16-bit
integer values and return an array of 32-bit integer values.  By
default, @code{fread} returns a double precision array.  The special
form @samp{*TYPE} is shorthand for @samp{TYPE=>TYPE}.

The conversion and repeat counts may be combined.  For example,
@samp{32*single=>single} causes @code{fread} to read blocks of single
precision floating point values and return an array of single precision
values instead of the default array of double precision values.

The optional argument @var{skip} specifies the number of bytes to skip
after each element (or block of elements) is read.  If it is not
specified, a value of 0 is assumed.  If the final block read is not
complete, the final skip is omitted.  For example,

@example
fread (f, 10, "3*single=>single", 8)
@end example

@noindent
will omit the final 8-byte skip because the last read will not be
a complete block of 3 values.

The optional argument @var{arch} is a string specifying the data format
for the file.  Valid values are

@table @code
@item "native"
The format of the current machine.

@item "ieee-be"
IEEE big endian.

@item "ieee-le"
IEEE little endian.

@item "vaxd"
VAX D floating format.

@item "vaxg"
VAX G floating format.

@item "cray"
Cray floating format.
@end table

@noindent
Conversions are currently only supported for @code{"ieee-be"} and
@code{"ieee-le"} formats.

The data read from the file is returned in @var{val}, and the number of
values read is returned in @code{count}
@seealso{fwrite, fopen, fclose}
@end deftypefn
fwrite
-*- texinfo -*-
@deftypefn {Built-in Function} {@var{count} =} fwrite (@var{fid}, @var{data}, @var{precision}, @var{skip}, @var{arch})
Write data in binary form of type @var{precision} to the specified file
ID @var{fid}, returning the number of values successfully written to the
file.

The argument @var{data} is a matrix of values that are to be written to
the file.  The values are extracted in column-major order.

The remaining arguments @var{precision}, @var{skip}, and @var{arch} are
optional, and are interpreted as described for @code{fread}.

The behavior of @code{fwrite} is undefined if the values in @var{data}
are too large to fit in the specified precision.
@seealso{fread, fopen, fclose}
@end deftypefn
feof
-*- texinfo -*-
@deftypefn {Built-in Function} {} feof (@var{fid})
Return 1 if an end-of-file condition has been encountered for a given
file and 0 otherwise.  Note that it will only return 1 if the end of the
file has already been encountered, not if the next read operation will
result in an end-of-file condition.
@seealso{fread, fopen, fclose}
@end deftypefn
ferror
-*- texinfo -*-
@deftypefn {Built-in Function} {} ferror (@var{fid})
Return 1 if an error condition has been encountered for a given file
and 0 otherwise.  Note that it will only return 1 if an error has
already been encountered, not if the next operation will result in an
error condition.
@end deftypefn
popen
-*- texinfo -*-
@deftypefn {Built-in Function} {@var{fid} =} popen (@var{command}, @var{mode})
Start a process and create a pipe.  The name of the command to run is
given by @var{command}.  The file identifier corresponding to the input
or output stream of the process is returned in @var{fid}.  The argument
@var{mode} may be

@table @code
@item "r"
The pipe will be connected to the standard output of the process, and
open for reading.

@item "w"
The pipe will be connected to the standard input of the process, and
open for writing.
@end table

For example,

@example
@group
fid = popen ("ls -ltr / | tail -3", "r");
while (isstr (s = fgets (fid)))
  fputs (stdout, s);
endwhile
     @print{} drwxr-xr-x  33 root  root  3072 Feb 15 13:28 etc
     @print{} drwxr-xr-x   3 root  root  1024 Feb 15 13:28 lib
     @print{} drwxrwxrwt  15 root  root  2048 Feb 17 14:53 tmp
@end group
@end example
@end deftypefn
pclose
-*- texinfo -*-
@deftypefn {Built-in Function} {} pclose (@var{fid})
Close a file identifier that was opened by @code{popen}.  You may also
use @code{fclose} for the same purpose.
@end deftypefn
tmpnam
-*- texinfo -*-
@deftypefn {Built-in Function} {} tmpnam (@var{dir}, @var{prefix})
Return a unique temporary file name as a string.

If @var{prefix} is omitted, a value of @code{"oct-"} is used.
If @var{dir} is also omitted, the default directory for temporary files
is used.  If @var{dir} is provided, it must exist, otherwise the default
directory for temporary files is used.  Since the named file is not
opened, by @code{tmpnam}, it is possible (though relatively unlikely)
that it will not be available by the time your program attempts to open it.
@seealso{tmpfile, mkstemp, P_tmpdir}
@end deftypefn
tmpfile
-*- texinfo -*-
@deftypefn {Built-in Function} {[@var{fid}, @var{msg}] =} tmpfile ()
Return the file ID corresponding to a new temporary file with a unique
name.  The file is opened in binary read/write (@code{"w+b"}) mode.
The file will be deleted automatically when it is closed or when Octave
exits.

If successful, @var{fid} is a valid file ID and @var{msg} is an empty
string.  Otherwise, @var{fid} is -1 and @var{msg} contains a
system-dependent error message.
@seealso{tmpnam, mkstemp, P_tmpdir}
@end deftypefn
mkstemp
-*- texinfo -*-
@deftypefn {Built-in Function} {[@var{fid}, @var{name}, @var{msg}] =} mkstemp (@var{template}, @var{delete})
Return the file ID corresponding to a new temporary file with a unique
name created from @var{template}.  The last six characters of @var{template}
must be @code{XXXXXX} and these are replaced with a string that makes the
filename unique.  The file is then created with mode read/write and
permissions that are system dependent (on GNU/Linux systems, the permissions
will be 0600 for versions of glibc 2.0.7 and later).  The file is opened
with the @code{O_EXCL} flag.

If the optional argument @var{delete} is supplied and is true,
the file will be deleted automatically when Octave exits, or when
the function @code{purge_tmp_files} is called.

If successful, @var{fid} is a valid file ID, @var{name} is the name of
the file, and and @var{msg} is an empty string.  Otherwise, @var{fid}
is -1, @var{name} is empty, and @var{msg} contains a system-dependent
error message.
@seealso{tmpfile, tmpnam, P_tmpdir}
@end deftypefn
umask
-*- texinfo -*-
@deftypefn {Built-in Function} {} umask (@var{mask})
Set the permission mask for file creation.  The parameter @var{mask}
is an integer, interpreted as an octal number.  If successful,
returns the previous value of the mask (as an integer to be
interpreted as an octal number); otherwise an error message is printed.
@end deftypefn
P_tmpdir
-*- texinfo -*-
@deftypefn {Built-in Function} {} P_tmpdir ()
Return the default name of the directory for temporary files on
this system.  The name of this directory is system dependent.
@end deftypefn
SEEK_SET
-*- texinfo -*-
@deftypefn {Built-in Function} {} SEEK_SET ()
@deftypefnx {Built-in Function} {} SEEK_CUR ()
@deftypefnx {Built-in Function} {} SEEK_END ()
Return the value required to request that @code{fseek} perform
one of the following actions:
@table @code
@item SEEK_SET
Position file relative to the beginning.

@item SEEK_CUR
Position file relative to the current position.

@item SEEK_END
Position file relative to the end.
@end table
@end deftypefn
SEEK_CUR
-*- texinfo -*-
@deftypefn {Built-in Function} {} SEEK_CUR ()
See SEEK_SET.
@end deftypefn
SEEK_END
-*- texinfo -*-
@deftypefn {Built-in Function} {} SEEK_END ()
See SEEK_SET.
@end deftypefn
stdin
-*- texinfo -*-
@deftypefn {Built-in Function} {} stdin ()
Return the numeric value corresponding to the standard input stream.
When Octave is used interactively, this is filtered through the command
line editing functions.
@seealso{stdout, stderr}
@end deftypefn
stdout
-*- texinfo -*-
@deftypefn {Built-in Function} {} stdout ()
Return the numeric value corresponding to the standard output stream.
Data written to the standard output is normally filtered through the pager.
@seealso{stdin, stderr}
@end deftypefn
stderr
-*- texinfo -*-
@deftypefn {Built-in Function} {} stderr ()
Return the numeric value corresponding to the standard error stream.
Even if paging is turned on, the standard error is not sent to the
pager.  It is useful for error messages and prompts.
@seealso{stdin, stdout}
@end deftypefn
filter
-*- texinfo -*-
@deftypefn {Loadable Function} {y =} filter (@var{b}, @var{a}, @var{x})
@deftypefnx {Loadable Function} {[@var{y}, @var{sf}] =} filter (@var{b}, @var{a}, @var{x}, @var{si})
@deftypefnx {Loadable Function} {[@var{y}, @var{sf}] =} filter (@var{b}, @var{a}, @var{x}, [], @var{dim})
@deftypefnx {Loadable Function} {[@var{y}, @var{sf}] =} filter (@var{b}, @var{a}, @var{x}, @var{si}, @var{dim})
Return the solution to the following linear, time-invariant difference
equation:
@iftex
@tex
$$
\sum_{k=0}^N a_{k+1} y_{n-k} = \sum_{k=0}^M b_{k+1} x_{n-k}, \qquad
 1 \le n \le P
$$
@end tex
@end iftex
@ifinfo

@smallexample
   N                   M
  SUM a(k+1) y(n-k) = SUM b(k+1) x(n-k)      for 1<=n<=length(x)
  k=0                 k=0
@end smallexample
@end ifinfo

@noindent
where
@ifinfo
 N=length(a)-1 and M=length(b)-1.
@end ifinfo
@iftex
@tex
 $a \in \Re^{N-1}$, $b \in \Re^{M-1}$, and $x \in \Re^P$.
@end tex
@end iftex
over the first non-singleton dimension of @var{x} or over @var{dim} if
supplied. An equivalent form of this equation is:
@iftex
@tex
$$
y_n = -\sum_{k=1}^N c_{k+1} y_{n-k} + \sum_{k=0}^M d_{k+1} x_{n-k}, \qquad
 1 \le n \le P
$$
@end tex
@end iftex
@ifinfo

@smallexample
            N                   M
  y(n) = - SUM c(k+1) y(n-k) + SUM d(k+1) x(n-k)  for 1<=n<=length(x)
           k=1                 k=0
@end smallexample
@end ifinfo

@noindent
where
@ifinfo
 c = a/a(1) and d = b/a(1).
@end ifinfo
@iftex
@tex
$c = a/a_1$ and $d = b/a_1$.
@end tex
@end iftex

If the fourth argument @var{si} is provided, it is taken as the
initial state of the system and the final state is returned as
@var{sf}.  The state vector is a column vector whose length is
equal to the length of the longest coefficient vector minus one.
If @var{si} is not supplied, the initial state vector is set to all
zeros.

In terms of the z-transform, y is the result of passing the discrete-
time signal x through a system characterized by the following rational
system function:
@iftex
@tex
$$
H(z) = {\displaystyle\sum_{k=0}^M d_{k+1} z^{-k}
        \over 1 + \displaystyle\sum_{k+1}^N c_{k+1} z^{-k}}
$$
@end tex
@end iftex
@ifinfo

@example
             M
            SUM d(k+1) z^(-k)
            k=0
  H(z) = ----------------------
               N
          1 + SUM c(k+1) z^(-k)
              k=1
@end example
@end ifinfo
@end deftypefn
find
-*- texinfo -*-
@deftypefn {Loadable Function} {} find (@var{x})
@deftypefnx {Loadable Function} {} find (@var{x}, @var{n})
@deftypefnx {Loadable Function} {} find (@var{x}, @var{n}, @var{direction})
Return a vector of indices of nonzero elements of a matrix, as a row if
@var{x} is a row or as a column otherwise.  To obtain a single index for
each matrix element, Octave pretends that the columns of a matrix form one
long vector (like Fortran arrays are stored).  For example,

@example
@group
find (eye (2))
     @result{} [ 1; 4 ]
@end group
@end example

If two outputs are requested, @code{find} returns the row and column
indices of nonzero elements of a matrix.  For example,

@example
@group
[i, j] = find (2 * eye (2))
     @result{} i = [ 1; 2 ]
     @result{} j = [ 1; 2 ]
@end group
@end example

If three outputs are requested, @code{find} also returns a vector
containing the nonzero values.  For example,

@example
@group
[i, j, v] = find (3 * eye (2))
     @result{} i = [ 1; 2 ]
     @result{} j = [ 1; 2 ]
     @result{} v = [ 3; 3 ]
@end group
@end example

If two inputs are given, @var{n} indicates the number of elements to
find from the beginning of the matrix or vector.

If three inputs are given, @var{direction} should be one of "first" or
"last" indicating that it should start counting found elements from the
first or last element.
@end deftypefn
fsolve_options
-*- texinfo -*-
@deftypefn {Loadable Function} {} fsolve_options (@var{opt}, @var{val})
When called with two arguments, this function allows you set options
parameters for the function @code{fsolve}.  Given one argument,
@code{fsolve_options} returns the value of the corresponding option.  If
no arguments are supplied, the names of all the available options and
their current values are displayed.

Options include

@table @code
@item "tolerance"
Nonnegative relative tolerance.
@end table
@end deftypefn
fsolve
-*- texinfo -*-
@deftypefn {Loadable Function} {[@var{x}, @var{info}, @var{msg}] =} fsolve (@var{fcn}, @var{x0})
Given @var{fcn}, the name of a function of the form @code{f (@var{x})}
and an initial starting point @var{x0}, @code{fsolve} solves the set of
equations such that @code{f(@var{x}) == 0}.

If @var{fcn} is a two-element string array, or a two element cell array
containing either the function name or inline or function handle. The
first element names the function @math{f} described above, and the second
element names a function of the form @code{j (@var{x})} to compute the
Jacobian matrix with elements
@tex
$$ J = {\partial f_i \over \partial x_j} $$
@end tex
@ifinfo

@example
           df_i
jac(i,j) = ----
           dx_j
@end example
@end ifinfo

You can use the function @code{fsolve_options} to set optional
parameters for @code{fsolve}.
@end deftypefn
gammainc
-*- texinfo -*-
@deftypefn {Mapping Function} {} gammainc (@var{x}, @var{a})
Compute the normalized incomplete gamma function,
@iftex
@tex
$$
 \gamma (x, a) = {\displaystyle\int_0^x e^{-t} t^{a-1} dt \over \Gamma (a)}
$$
@end tex
@end iftex
@ifinfo

@smallexample
                                x
                      1        /
gammainc (x, a) = ---------    | exp (-t) t^(a-1) dt
                  gamma (a)    /
                            t=0
@end smallexample

@end ifinfo
with the limiting value of 1 as @var{x} approaches infinity.
The standard notation is @math{P(a,x)}, e.g. Abramowitz and Stegun (6.5.1).

If @var{a} is scalar, then @code{gammainc (@var{x}, @var{a})} is returned
for each element of @var{x} and vice versa.

If neither @var{x} nor @var{a} is scalar, the sizes of @var{x} and
@var{a} must agree, and @var{gammainc} is applied element-by-element.
@seealso{gamma, lgamma}
@end deftypefn
gcd
-*- texinfo -*-
@deftypefn {Loadable Function} {@var{g} =} gcd (@var{a1}, @dots{})
@deftypefnx {Loadable Function} {[@var{g}, @var{v1}, @dots{}] =} gcd (@var{a1}, @dots{})

If a single argument is given then compute the greatest common divisor of
the elements of this argument. Otherwise if more than one argument is
given all arguments must be the same size or scalar. In this case the
greatest common divisor is calculated for element individually. All
elements must be integers. For example,

@example
@group
gcd ([15, 20])
    @result{}  5
@end group
@end example

@noindent
and

@example
@group
gcd ([15, 9], [20 18])
    @result{}  5  9
@end group
@end example

Optional return arguments @var{v1}, etc, contain integer vectors such
that,

@ifinfo
@example
@var{g} = @var{v1} .* @var{a1} + @var{v2} .* @var{a2} + @dots{}
@end example
@end ifinfo
@iftex
@tex
$g = v_1 a_1 + v_2 a_2 + \cdots$
@end tex
@end iftex

For backward compatiability with previous versions of this function, when
all arguments are scalr, a single return argument @var{v1} containing
all of the values of @var{v1}, @dots{} is acceptable.
@seealso{lcm, min, max, ceil, floor}
@end deftypefn
getgrent
-*- texinfo -*-
@deftypefn {Loadable Function} {@var{grp_struct} =} getgrent ()
Return an entry from the group database, opening it if necessary.
Once the end of the data has been reached, @code{getgrent} returns 0.
@end deftypefn
getgrgid
-*- texinfo -*-
@deftypefn {Loadable Function} {@var{grp_struct} =} getgrgid (@var{gid}).
Return the first entry from the group database with the group ID
@var{gid}.  If the group ID does not exist in the database,
@code{getgrgid} returns 0.
@end deftypefn
getgrnam
-*- texinfo -*-
@deftypefn {Loadable Function} {@var{grp_struct} =} getgrnam (@var{name})
Return the first entry from the group database with the group name
@var{name}.  If the group name does not exist in the database,
@code{getgrname} returns 0.
@end deftypefn
setgrent
-*- texinfo -*-
@deftypefn {Loadable Function} {} setgrent ()
Return the internal pointer to the beginning of the group database.
@end deftypefn
endgrent
-*- texinfo -*-
@deftypefn {Loadable Function} {} endgrent ()
Close the group database.
@end deftypefn
getpwent
-*- texinfo -*-
@deftypefn {Loadable Function} {@var{pw_struct} = } getpwent ()
Return a structure containing an entry from the password database,
opening it if necessary. Once the end of the data has been reached,
@code{getpwent} returns 0.
@end deftypefn
getpwuid
-*- texinfo -*-
@deftypefn {Loadable Function} {@var{pw_struct} = } getpwuid (@var{uid}).
Return a structure containing the first entry from the password database
with the user ID @var{uid}.  If the user ID does not exist in the
database, @code{getpwuid} returns 0.
@end deftypefn
getpwnam
-*- texinfo -*-
@deftypefn {Loadable Function} {@var{pw_struct} = } getpwnam (@var{name})
Return a structure containing the first entry from the password database
with the user name @var{name}.  If the user name does not exist in the
database, @code{getpwname} returns 0.
@end deftypefn
setpwent
-*- texinfo -*-
@deftypefn {Loadable Function} {} setpwent ()
Return the internal pointer to the beginning of the password database.
@end deftypefn
endpwent
-*- texinfo -*-
@deftypefn {Loadable Function} {} endpwent ()
Close the password database.
@end deftypefn
getrusage
-*- texinfo -*-
@deftypefn {Loadable Function} {} getrusage ()
Return a structure containing a number of statistics about the current
Octave process.  Not all fields are available on all systems.  If it is
not possible to get CPU time statistics, the CPU time slots are set to
zero.  Other missing data are replaced by NaN.  Here is a list of all
the possible fields that can be present in the structure returned by
@code{getrusage}:

@table @code
@item idrss
Unshared data size.

@item inblock
Number of block input operations.

@item isrss
Unshared stack size.

@item ixrss
Shared memory size.

@item majflt
Number of major page faults.

@item maxrss
Maximum data size.

@item minflt
Number of minor page faults.

@item msgrcv
Number of messages received.

@item msgsnd
Number of messages sent.

@item nivcsw
Number of involuntary context switches.

@item nsignals
Number of signals received.

@item nswap
Number of swaps.

@item nvcsw
Number of voluntary context switches.

@item oublock
Number of block output operations.

@item stime
A structure containing the system CPU time used.  The structure has the
elements @code{sec} (seconds) @code{usec} (microseconds).

@item utime
A structure containing the user CPU time used.  The structure has the
elements @code{sec} (seconds) @code{usec} (microseconds).
@end table
@end deftypefn
givens
-*- texinfo -*-
@deftypefn {Loadable Function} {@var{g} =} givens (@var{x}, @var{y})
@deftypefnx {Loadable Function} {[@var{c}, @var{s}] =} givens (@var{x}, @var{y})
@iftex
@tex
Return a $2\times 2$ orthogonal matrix
$$
 G = \left[\matrix{c & s\cr -s'& c\cr}\right]
$$
such that
$$
 G \left[\matrix{x\cr y}\right] = \left[\matrix{\ast\cr 0}\right]
$$
with $x$ and $y$ scalars.
@end tex
@end iftex
@ifinfo
Return a 2 by 2 orthogonal matrix
@code{@var{g} = [@var{c} @var{s}; -@var{s}' @var{c}]} such that
@code{@var{g} [@var{x}; @var{y}] = [*; 0]} with @var{x} and @var{y} scalars.
@end ifinfo

For example,

@example
@group
givens (1, 1)
     @result{}   0.70711   0.70711
         -0.70711   0.70711
@end group
@end example
@end deftypefn
ishandle
-*- texinfo -*-
@deftypefn {Built-in Function} {} ishandle (@var{h})
Return true if @var{h} is a graphics handle and false otherwise.
@end deftypefn
set
-*- texinfo -*-
@deftypefn {Built-in Function} {} set (@var{h}, @var{p}, @var{v}, @dots{})
Set the named property value or vector @var{p} to the value @var{v}
for the graphics handle @var{h}.
@end deftypefn
get
-*- texinfo -*-
@deftypefn {Built-in Function} {} get (@var{h}, @var{p})
Return the named property @var{p} from the graphics handle @var{h}.
If @var{p} is omitted, return the complete property list for @var{h}.
If @var{h} is a vector, return a cell array including the property
values or lists respectively.
@end deftypefn
__go_figure__
-*- texinfo -*-
@deftypefn {Built-in Function} {} __go_figure__ (@var{fignum})
Create a figure graphics object.
@end deftypefn
__go_axes__
-*- texinfo -*-
@deftypefn {Built-in Function} {} __go_axes__ (@var{parent})
Create an axes graphics object.
@end deftypefn
__go_line__
-*- texinfo -*-
@deftypefn {Built-in Function} {} __go_line__ (@var{parent})
Create a line graphics object.
@end deftypefn
__go_text__
-*- texinfo -*-
@deftypefn {Built-in Function} {} __go_text__ (@var{parent})
Create a text graphics object.
@end deftypefn
__go_image__
-*- texinfo -*-
@deftypefn {Built-in Function} {} __go_image__ (@var{parent})
Create an image graphics object.
@end deftypefn
__go_surface__
-*- texinfo -*-
@deftypefn {Built-in Function} {} __go_surface__ (@var{parent})
Create a surface graphics object.
@end deftypefn
__go_patch__
-*- texinfo -*-
@deftypefn {Built-in Function} {} __go_patch__ (@var{parent})
Create a patch graphics object.
@end deftypefn
__go_delete__
-*- texinfo -*-
@deftypefn {Built-in Function} {} __go_delete__ (@var{h})
@end deftypefn
__go_axes_init__
-*- texinfo -*-
@deftypefn {Built-in Function} {} __go_axes_init__ (@var{h}, @var{mode})
Initialize axes object.
@end deftypefn
__go_handles__
-*- texinfo -*-
@deftypefn {Built-in Function} {} __go_handles__ ()
Return current list of function handles.
@end deftypefn
__go_figure_handles__
-*- texinfo -*-
@deftypefn {Built-in Function} {} __go_figure_handles__ ()
Return current list of function handles.
@end deftypefn
help
-*- texinfo -*-
@deffn {Command} help @var{name}
Display the help text for @var{name}.
If invoked without any arguments, @code{help} prints a list
of all the available operators and functions.

For example, the command @kbd{help help} prints a short message
describing the @code{help} command.

The help command can give you information about operators, but not the
comma and semicolons that are used as command separators.  To get help
for those, you must type @kbd{help comma} or @kbd{help semicolon}.
@seealso{doc, which, lookfor}
@end deffn
type
-*- texinfo -*-

@deffn {Command} type options name @dots{}
Display the definition of each @var{name} that refers to a function.

Normally also displays whether each @var{name} is user-defined or built-in;
the @code{-q} option suppresses this behaviour.
@end deffn
which
-*- texinfo -*-
@deffn {Command} which name @dots{}
Display the type of each @var{name}.  If @var{name} is defined from a
function file, the full name of the file is also displayed.
@seealso{help, lookfor}
@end deffn
lookfor
-*- texinfo -*-
@deffn {Command} lookfor @var{str}
@deffnx {Command} lookfor -all @var{str}
@deffnx {Function} {[@var{fun}, @var{helpstring}] = } lookfor (@var{str})
@deffnx {Function} {[@var{fun}, @var{helpstring}] = } lookfor ('-all', @var{str})
Search for the string @var{str} in all of the functions found in the
function search path.  By default @code{lookfor} searchs for @var{str}
in the first sentence of the help string of each function found. The entire
help string of each function found in the path can be search if
the '-all' argument is supplied. All searches are case insensitive.

Called with no output arguments, @code{lookfor} prints the list of matching
functions to the terminal. Otherwise the output arguments @var{fun} and
@var{helpstring} define the matching functions and the first sentence of
each of their help strings.

Note that the ability of @code{lookfor} to correctly identify the first
sentence of the help of the functions is dependent on the format of the
functions help. All of the functions in Octave itself will correctly
find the first sentence, but the same can not be guaranteed for other
functions. Therefore the use of the '-all' argument might be necessary
to find related functions that are not part of Octave.
@seealso{help, which}
@end deffn
info_file
-*- texinfo -*-
@deftypefn {Built-in Function} {@var{val} =} info_file ()
@deftypefnx {Built-in Function} {@var{old_val} =} info_file (@var{new_val})
Query or set the internal variable that specifies the name of the
Octave info file.  The default value is
@code{"@var{octave-home}/info/octave.info"}, in
which @var{octave-home} is the directory where all of Octave is installed.
@seealso{info_program, doc, help, makeinfo_program}
@end deftypefn
info_program
-*- texinfo -*-
@deftypefn {Built-in Function} {@var{val} =} info_program ()
@deftypefnx {Built-in Function} {@var{old_val} =} info_program (@var{new_val})
Query or set the internal variable that specifies the name of the
info program to run.  The default initial value is
@code{"@var{octave-home}/libexec/octave/@var{version}/exec/@var{arch}/info"}
in which @var{octave-home} is the directory where all of Octave is
installed, @var{version} is the Octave version number, and @var{arch}
is the system type (for example, @code{i686-pc-linux-gnu}).  The
default initial value may be overridden by the environment variable
@code{OCTAVE_INFO_PROGRAM}, or the command line argument
@code{--info-program NAME}.
@seealso{info_file, doc, help, makeinfo_program}
@end deftypefn
makeinfo_program
-*- texinfo -*-
@deftypefn {Built-in Function} {@var{val} =} makeinfo_program ()
@deftypefnx {Built-in Function} {@var{old_val} =} makeinfo_program (@var{new_val})
Query or set the internal variable that specifies the name of the
makeinfo program that Octave runs to format help text containing
Texinfo markup commands.  The default initial value is @code{"makeinfo"}.
@seealso{info_file, info_program, doc, help}
@end deftypefn
suppress_verbose_help_message
-*- texinfo -*-
@deftypefn {Built-in Function} {@var{val} =} suppress_verbose_help_message ()
@deftypefnx {Built-in Function} {@var{old_val} =} suppress_verbose_help_message (@var{new_val})
Query or set the internal vaiable that controls whether Octave
will add additional help information to the end of the output from
the @code{help} command and usage messages for built-in commands.
@end deftypefn
hess
-*- texinfo -*-
@deftypefn {Loadable Function} {@var{h} =} hess (@var{a})
@deftypefnx {Loadable Function} {[@var{p}, @var{h}] =} hess (@var{a})
@cindex Hessenberg decomposition
Compute the Hessenberg decomposition of the matrix @var{a}.

The Hessenberg decomposition is usually used as the first step in an
eigenvalue computation, but has other applications as well (see Golub,
Nash, and Van Loan, IEEE Transactions on Automatic Control, 1979).  The
Hessenberg decomposition is
@iftex
@tex
$$
A = PHP^T
$$
where $P$ is a square unitary matrix ($P^HP = I$), and $H$
is upper Hessenberg ($H_{i,j} = 0, \forall i \ge j+1$).
@end tex
@end iftex
@ifinfo
@code{p * h * p' = a} where @code{p} is a square unitary matrix
(@code{p' * p = I}, using complex-conjugate transposition) and @code{h}
is upper Hessenberg (@code{i >= j+1 => h (i, j) = 0}).
@end ifinfo
@end deftypefn
input
-*- texinfo -*-
@deftypefn {Built-in Function} {} input (@var{prompt})
@deftypefnx {Built-in Function} {} input (@var{prompt}, "s")
Print a prompt and wait for user input.  For example,

@example
input ("Pick a number, any number! ")
@end example

@noindent
prints the prompt

@example
Pick a number, any number!
@end example

@noindent
and waits for the user to enter a value.  The string entered by the user
is evaluated as an expression, so it may be a literal constant, a
variable name, or any other valid expression.

Currently, @code{input} only returns one value, regardless of the number
of values produced by the evaluation of the expression.

If you are only interested in getting a literal string value, you can
call @code{input} with the character string @code{"s"} as the second
argument.  This tells Octave to return the string entered by the user
directly, without evaluating it first.

Because there may be output waiting to be displayed by the pager, it is
a good idea to always call @code{fflush (stdout)} before calling
@code{input}.  This will ensure that all pending output is written to
the screen before your prompt.  @xref{Input and Output}.
@end deftypefn
yes_or_no
-*- texinfo -*-
@deftypefn {Built-in Function} {} yes_or_no (@var{prompt})
Ask the user a yes-or-no question.  Return 1 if the answer is yes.
Takes one argument, which is the string to display to ask the
question.  It should end in a space; @samp{yes-or-no-p} adds
@samp{(yes or no) } to it.  The user must confirm the answer with
RET and can edit it until it has been confirmed.
@end deftypefn
keyboard
-*- texinfo -*-
@deftypefn {Built-in Function} {} keyboard (@var{prompt})
This function is normally used for simple debugging.  When the
@code{keyboard} function is executed, Octave prints a prompt and waits
for user input.  The input strings are then evaluated and the results
are printed.  This makes it possible to examine the values of variables
within a function, and to assign new values to variables.  No value is
returned from the @code{keyboard} function, and it continues to prompt
for input until the user types @samp{quit}, or @samp{exit}.

If @code{keyboard} is invoked without any arguments, a default prompt of
@samp{debug> } is used.
@end deftypefn
echo
-*- texinfo -*-
@deffn {Command} echo options
Control whether commands are displayed as they are executed.  Valid
options are:

@table @code
@item on
Enable echoing of commands as they are executed in script files.

@item off
Disable echoing of commands as they are executed in script files.

@item on all
Enable echoing of commands as they are executed in script files and
functions.

@item off all
Disable echoing of commands as they are executed in script files and
functions.
@end table

@noindent
If invoked without any arguments, @code{echo} toggles the current echo
state.
@end deffn
completion_matches
-*- texinfo -*-
@deftypefn {Built-in Function} {} completion_matches (@var{hint})
Generate possible completions given @var{hint}.

This function is provided for the benefit of programs like Emacs which
might be controlling Octave and handling user input.  The current
command number is not incremented when this function is called.  This is
a feature, not a bug.
@end deftypefn
read_readline_init_file
-*- texinfo -*-
@deftypefn {Built-in Function} {} read_readline_init_file (@var{file})
Read the readline library initialiazation file @var{file}.  If
@var{file} is omitted, read the default initialization file (normally
@file{~/.inputrc}).

@xref{Readline Init File, , , readline, GNU Readline Library},
for details.
@end deftypefn
input_event_hook
-*- texinfo -*-
@deftypefn {Built-in Function} {[@var{ofcn}, @var{odata}] =} input_event_hook (@var{fcn}, @var{data})
Given the name of a function as a string and any Octave value object,
install @var{fcn} as a function to call periodically, when Octave is
waiting for input.  The function should have the form
@example
@var{fcn} (@var{data})
@end example

If @var{data} is omitted, Octave calls the function without any
arguments.  If both @var{fcn} and @var{data} are omitted, Octave
clears the hook.  In all cases, the name of the previous hook function
and the user data are returned.
@end deftypefn
PS1
-*- texinfo -*-
@deftypefn {Built-in Function} {@var{val} =} PS1 ()
@deftypefnx {Built-in Function} {@var{old_val} =} PS1 (@var{new_val})
Query or set the primary prompt string.  When executing interactively,
Octave displays the primary prompt when it is ready to read a command.

The default value of the primary prompt string is @code{"\s:\#> "}.
To change it, use a command like

@example
octave:13> PS1 = "\\u@@\\H> "
@end example

@noindent
which will result in the prompt @samp{boris@@kremvax> } for the user
@samp{boris} logged in on the host @samp{kremvax.kgb.su}.  Note that two
backslashes are required to enter a backslash into a double-quoted
character string.
@xref{Strings}.
@seealso{PS2, PS4}
@end deftypefn
PS2
-*- texinfo -*-
@deftypefn {Built-in Function} {@var{val} =} PS2 ()
@deftypefnx {Built-in Function} {@var{old_val} =} PS2 (@var{new_val})
Query or set the secondary prompt string.  The secondary prompt is
printed when Octave is expecting additional input to complete a
command.  For example, if you are typing a for loop that spans several
lines, Octave will print the secondary prompt at the beginning of
each line after the first.  The default value of the secondary prompt
string is @code{"> "}.
@seealso{PS1, PS4}
@end deftypefn
PS4
-*- texinfo -*-
@deftypefn {Built-in Function} {@var{val} =} PS4 ()
@deftypefnx {Built-in Function} {@var{old_val} =} PS4 (@var{new_val})
Query or set the character string used to prefix output produced
when echoing commands when @code{echo_executing_commands} is enabled.
The default value is @code{"+ "}.
@xref{Invoking Octave from the Command Line}, for a description of
@code{--echo-commands}.
@seealso{echo_executing_commands, PS1, PS2}
@end deftypefn
completion_append_char
-*- texinfo -*-
@deftypefn {Built-in Function} {@var{val} =} completion_append_char ()
@deftypefnx {Built-in Function} {@var{old_val} =} completion_append_char (@var{new_val})
Query or set the internal character variable that is appended to
successful command-line completion attempts.  The default
value is @code{" "} (a single space).
@end deftypefn
echo_executing_commands
-*- texinfo -*-
@deftypefn {Built-in Function} {@var{val} =} echo_executing_commands ()
@deftypefnx {Built-in Function} {@var{old_val} =} echo_executing_commands (@var{new_val})
Query or set the internal variable that controls the echo state.
It may be the sum of the following values:

@table @asis
@item 1
Echo commands read from script files.

@item 2
Echo commands from functions.

@item 4
Echo commands read from command line.
@end table

More than one state can be active at once.  For example, a value of 3 is
equivalent to the command @kbd{echo on all}.

The value of @code{echo_executing_commands} is set by the @kbd{echo}
command and the command line option @code{--echo-input}.
@end deftypefn
__request_drawnow__
-*- texinfo -*-
@deftypefn {Built-in Function} {} __request_drawnow__ ()
@deftypefnx {Built-in Function} {} __request_drawnow__ (@var{flag})
Request a call drawnow at the next user prompt.
@end deftypefn
inv
-*- texinfo -*-
@deftypefn {Loadable Function} {[@var{x}, @var{rcond}] = } inv (@var{a})
@deftypefnx {Loadable Function} {[@var{x}, @var{rcond}] = } inverse (@var{a})
Compute the inverse of the square matrix @var{a}.  Return an estimate
of the reciprocal condition number if requested, otherwise warn of an
ill-conditioned matrix if the reciprocal condition number is small.
@end deftypefn
inverse
-*- texinfo -*-
@deftypefn {Loadable Function} {} inverse (@var{a})
See inv.
@end deftypefn
kron
-*- texinfo -*-
@deftypefn {Loadable Function} {} kron (@var{a}, @var{b})
Form the kronecker product of two matrices, defined block by block as

@example
x = [a(i, j) b]
@end example

For example,

@example
@group
kron (1:4, ones (3, 1))
      @result{}  1  2  3  4
          1  2  3  4
          1  2  3  4
@end group
@end example
@end deftypefn
iskeyword
-*- texinfo -*-
@deftypefn {Built-in Function} {} iskeyword (@var{name})
Return true if @var{name} is an Octave keyword.  If @var{name}
is omitted, return a list of keywords.
@end deftypefn
__token_count__
-*- texinfo -*-
@deftypefn {Built-in Function} {} __token_count__
Number of language tokens processed since Octave startup.
@end deftypefn
genpath
-*- texinfo -*-
@deftypefn {Built-in Function} {} genpath (@var{dir})
Return a path constructed from @var{dir} and all its subdiretories.
@end deftypefn
rehash
-*- texinfo -*-
@deftypefn {Built-in Function} {} rehash ()
Reinitialize Octave's load path directory cache.
@end deftypefn
pathdef
-*- texinfo -*-
@deftypefn {Built-in Function} {@var{val} =} pathdef ()
Return the default list of directories in which to search for function
files.
@seealso{path, addpath, rmpath, genpath, savepath, pathsep}
@end deftypefn
path
-*- texinfo -*-
@deftypefn {Built-in Function} {} path (@dots{})
Modify or display Octave's load path.

If @var{nargin} and @var{nargout} are zero, display the elements of
Octave's load path in an easy to read format.

If @var{nargin} is zero and nargout is greater than zero, return the
current load path.

If @var{nargin} is greater than zero, concatenate the arguments,
separating them with @code{pathsep()}.  Set the internal search path
to the result and return it.

No checks are made for duplicate elements.
@seealso{addpath, rmpath, genpath, pathdef, savepath, pathsep}
@end deftypefn
addpath
-*- texinfo -*-
@deftypefn {Built-in Function} {} addpath (@var{dir1}, @dots{})
@deftypefnx {Built-in Function} {} addpath (@var{dir1}, @dots{}, @var{option})
Add @var{dir1}, @dots{} to the current function search path.  If
@var{option} is @samp{"-begin"} or 0 (the default), prepend the
directory name to the current path.  If @var{option} is @samp{"-end"}
or 1, append the directory name to the current path.
Directories added to the path must exist.
@seealso{path, rmpath, genpath, pathdef, savepath, pathsep}
@end deftypefn
rmpath
-*- texinfo -*-
@deftypefn {Built-in Function} {} rmpath (@var{dir1}, @dots{})
Remove @var{dir1}, @dots{} from the current function search path.

@seealso{path, addpath, genpath, pathdef, savepath, pathsep}
@end deftypefn
load
-*- texinfo -*-
@deffn {Command} load options file v1 v2 @dots{}
Load the named variables from the file @var{file}.  As with @code{save},
you may specify a list of variables and @code{load} will only extract
those variables with names that match.  For example, to restore the
variables saved in the file @file{data}, use the command

@example
load data
@end example

If load is invoked using the functional form

@example
load ("-text", "file.txt", "a")
@end example

@noindent
then the @var{options}, @var{file}, and variable name arguments
(@var{v1}, @dots{}) must be specified as character strings.

If a variable that is not marked as global is loaded from a file when a
global symbol with the same name already exists, it is loaded in the
global symbol table.  Also, if a variable is marked as global in a file
and a local symbol exists, the local symbol is moved to the global
symbol table and given the value from the file.  Since it seems that
both of these cases are likely to be the result of some sort of error,
they will generate warnings.

If invoked with a single output argument, Octave returns data instead
of inserting variables in the symbol table.  If the data file contains
only numbers (TAB- or space-delimited columns), a matrix of values is
returned.  Otherwise, @code{load} returns a structure with members
 corresponding to the names of the variables in the file.

The @code{load} command can read data stored in Octave's text and
binary formats, and @sc{Matlab}'s binary format.  It will automatically
detect the type of file and do conversion from different floating point
formats (currently only IEEE big and little endian, though other formats
may added in the future).

Valid options for @code{load} are listed in the following table.

@table @code
@item -force
The @samp{-force} option is accepted but ignored for backward
compatibility. Octave now overwrites variables currently in memory with
the same name as those found in the file.

@item -ascii
Force Octave to assume the file contains columns of numbers in text format
without any header or other information.  Data in the file will be loaded
as a single numeric matrix with the name of the variable derived from the
name of the file.

@item -binary
Force Octave to assume the file is in Octave's binary format.

@item -mat
@itemx -mat-binary
@itemx -6
@itemx -v6
@itemx -7
@itemx -v7
Force Octave to assume the file is in @sc{Matlab}'s version 6 or 7 binary
format.

@item -V4
@itemx -v4
@itemx -4
@itemx -mat4-binary
Force Octave to assume the file is in the binary format written by
@sc{Matlab} version 4.

@item -hdf5
Force Octave to assume the file is in HDF5 format.
(HDF5 is a free, portable binary format developed by the National
Center for Supercomputing Applications at the University of Illinois.)
Note that Octave can read HDF5 files not created by itself, but may
skip some datasets in formats that it cannot support.

@item -import
The @samp{-import} is accepted but ignored for backward compatibility.
Octave can now support multi-dimensional HDF data and automatically
modifies variable names if they are invalid Octave identifiers.

@item -text
Force Octave to assume the file is in Octave's text format.
@end table
@end deffn
save
-*- texinfo -*-
@deffn {Command} save options file @var{v1} @var{v2} @dots{}
Save the named variables @var{v1}, @var{v2}, @dots{} in the file
@var{file}.  The special filename @samp{-} can be used to write the
output to your terminal.  If no variable names are listed, Octave saves
all the variables in the current scope.  Valid options for the
@code{save} command are listed in the following table.  Options that
modify the output format override the format specified by
@code{default_save_options}.

If save is invoked using the functional form

@example
save ("-text", "file.txt", "a")
@end example

@noindent
then the @var{options}, @var{file}, and variable name arguments
(@var{vname1}, @dots{}) must be specified as character strings.

@table @code
@item -ascii
Save a single matrix in a text file.

@item -binary
Save the data in Octave's binary data format.

@item -float-binary
Save the data in Octave's binary data format but only using single
precision.  You should use this format only if you know that all the
values to be saved can be represented in single precision.

@item -V7
@itemx -v7
@itemx -7
@itemx -mat7-binary
Save the data in @sc{Matlab}'s v7 binary data format.

@item -V6
@itemx -v6
@itemx -6
@itemx -mat
@itemx -mat-binary
Save the data in @sc{Matlab}'s v6 binary data format.

@item -V4
@itemx -v4
@itemx -4
@itemx -mat4-binary
Save the data in the binary format written by @sc{Matlab} version 4.

@item -hdf5
Save the data in HDF5 format.
(HDF5 is a free, portable binary format developed by the National
Center for Supercomputing Applications at the University of Illinois.)

@item -float-hdf5
Save the data in HDF5 format but only using single precision.
You should use this format only if you know that all the
values to be saved can be represented in single precision.

@item -zip
@itemx -z
Use the gzip algorithm to compress the file. This works equally on files that
are compressed with gzip outside of octave, and gzip can equally be used to
convert the files for backward compatibility.
@end table

The list of variables to save may include wildcard patterns containing
the following special characters:
@table @code
@item ?
Match any single character.

@item *
Match zero or more characters.

@item [ @var{list} ]
Match the list of characters specified by @var{list}.  If the first
character is @code{!} or @code{^}, match all characters except those
specified by @var{list}.  For example, the pattern @samp{[a-zA-Z]} will
match all lower and upper case alphabetic characters. 

@item -text
Save the data in Octave's text data format.
@end table

Except when using the @sc{Matlab} binary data file format, saving global
variables also saves the global status of the variable, so that if it is
restored at a later time using @samp{load}, it will be restored as a
global variable.

The command

@example
save -binary data a b*
@end example

@noindent
saves the variable @samp{a} and all variables beginning with @samp{b} to
the file @file{data} in Octave's binary format.
@end deffn
crash_dumps_octave_core
-*- texinfo -*-
@deftypefn {Built-in Function} {@var{val} =} crash_dumps_octave_core ()
@deftypefnx {Built-in Function} {@var{old_val} =} crash_dumps_octave_core (@var{new_val})
Query or set the internal variable that controls whether Octave tries
to save all current variables to the file "octave-core" if it
crashes or receives a hangup, terminate or similar signal.
@seealso{octave_core_file_limit, octave_core_file_name, octave_core_file_options}
@end deftypefn
default_save_options
-*- texinfo -*-
@deftypefn {Built-in Function} {@var{val} =} default_save_options ()
@deftypefnx {Built-in Function} {@var{old_val} =} default_save_options (@var{new_val})
Query or set the internal variable that specifies the default options
for the @code{save} command, and defines the default format.
Typical values include @code{"-ascii"}, @code{"-ascii -zip"}.
The default value is @code{-ascii}.
@seealso{save}
@end deftypefn
octave_core_file_limit
-*- texinfo -*-
@deftypefn {Built-in Function} {@var{val} =} octave_core_file_limit ()
@deftypefnx {Built-in Function} {@var{old_val} =} octave_core_file_limit (@var{new_val})
Query or set the internal variable that specifies the maximum amount
of memory (in kilobytes) of the top-level workspace that Octave will
attempt to save when writing data to the crash dump file (the name of
the file is specified by @var{octave_core_file_name}).  If
@var{octave_core_file_options} flags specifies a binary format,
then @var{octave_core_file_limit} will be approximately the maximum
size of the file.  If a text file format is used, then the file could
be much larger than the limit.  The default value is -1 (unlimited)
@seealso{crash_dumps_octave_core, octave_core_file_name, octave_core_file_options}
@end deftypefn
octave_core_file_name
-*- texinfo -*-
@deftypefn {Built-in Function} {@var{val} =} octave_core_file_name ()
@deftypefnx {Built-in Function} {@var{old_val} =} octave_core_file_name (@var{new_val})
Query or set the internal variable that specifies the name of the file
used for saving data from the top-level workspace if Octave aborts.
The default value is @code{"octave-core"}
@seealso{crash_dumps_octave_core, octave_core_file_name, octave_core_file_options}
@end deftypefn
octave_core_file_options
-*- texinfo -*-
@deftypefn {Built-in Function} {@var{val} =} octave_core_file_options ()
@deftypefnx {Built-in Function} {@var{old_val} =} octave_core_file_options (@var{new_val})
Query or set the internal variable that specifies the options used for
saving the workspace data if Octave aborts.  The value of
@code{octave_core_file_options} should follow the same format as the
options for the @code{save} function. The default value is Octave's binary
format.
@seealso{crash_dumps_octave_core, octave_core_file_name, octave_core_file_limit}
@end deftypefn
save_header_format_string
-*- texinfo -*-
@deftypefn {Built-in Function} {@var{val} =} save_header_format_string ()
@deftypefnx {Built-in Function} {@var{old_val} =} save_header_format_string (@var{new_val})
Query or set the internal variable that specifies the format
string used for the comment line written at the beginning of
text-format data files saved by Octave.  The format string is
passed to @code{strftime} and should begin with the character
@samp{#} and contain no newline characters.  If the value of
@code{save_header_format_string} is the empty string,
the header comment is omitted from text-format data files.  The
default value is

@example
"# Created by Octave VERSION, %a %b %d %H:%M:%S %Y %Z <USER@@HOST>"
@end example
@seealso{strftime}
@end deftypefn
lpsolve
-*- texinfo -*-
@deftypefn {Loadable Function} {} lpsolve ()
Not implemented yet...
@end deftypefn
lpsolve_options
-*- texinfo -*-
@deftypefn {Loadable Function} {} lpsolve_options ()
Not implemented yet...
@end deftypefn
save_precision
-*- texinfo -*-
@deftypefn {Built-in Function} {@var{val} =} save_precision ()
@deftypefnx {Built-in Function} {@var{old_val} =} save_precision (@var{new_val})
Query or set the internal variable that specifies the number of
digits to keep when saving data in text format.
@end deftypefn
lsode_options
-*- texinfo -*-
@deftypefn {Loadable Function} {} lsode_options (@var{opt}, @var{val})
When called with two arguments, this function
allows you set options parameters for the function @code{lsode}.
Given one argument, @code{lsode_options} returns the value of the
corresponding option.  If no arguments are supplied, the names of all
the available options and their current values are displayed.

Options include

@table @code
@item "absolute tolerance"
Absolute tolerance.  May be either vector or scalar.  If a vector, it
must match the dimension of the state vector.
@item "relative tolerance"
Relative tolerance parameter.  Unlike the absolute tolerance, this
parameter may only be a scalar.

The local error test applied at each integration step is

@example
  abs (local error in x(i)) <= rtol * abs (y(i)) + atol(i)
@end example
@item "integration method"
A string specifing the method of integration to use to solve the ODE
system.  Valid values are

@table @asis
@item "adams"
@itemx "non-stiff"
No Jacobian used (even if it is available).
@item "bdf"
@item "stiff"
Use stiff backward differentiation formula (BDF) method.  If a
function to compute the Jacobian is not supplied, @code{lsode} will
compute a finite difference approximation of the Jacobian matrix.
@end table
@item "initial step size"
The step size to be attempted on the first step (default is determined
automatically).
@item "maximum order"
Restrict the maximum order of the solution method.  If using the Adams
method, this option must be between 1 and 12.  Otherwise, it must be
between 1 and 5, inclusive.
@item "maximum step size"
Setting the maximum stepsize will avoid passing over very large
regions  (default is not specified).
@item "minimum step size"
The minimum absolute step size allowed (default is 0).
@item "step limit"
Maximum number of steps allowed (default is 100000).
@end table
@end deftypefn
lsode
-*- texinfo -*-
@deftypefn {Loadable Function} {[@var{x}, @var{istate}, @var{msg}] =} lsode (@var{fcn}, @var{x_0}, @var{t}, @var{t_crit})
Solve the set of differential equations
@tex
$$ {dx \over dt} = f (x, t) $$
with
$$ x(t_0) = x_0 $$
@end tex
@ifinfo

@example
dx
-- = f(x, t)
dt
@end example

with

@example
x(t_0) = x_0
@end example

@end ifinfo
The solution is returned in the matrix @var{x}, with each row
corresponding to an element of the vector @var{t}.  The first element
of @var{t} should be @math{t_0} and should correspond to the initial
state of the system @var{x_0}, so that the first row of the output
is @var{x_0}.

The first argument, @var{fcn}, is a string, or cell array of strings,
inline or function handles, that names the function to call to compute
the vector of right hand sides for the set of equations. The function
must have the form

@example
@var{xdot} = f (@var{x}, @var{t})
@end example

@noindent
in which @var{xdot} and @var{x} are vectors and @var{t} is a scalar.

If @var{fcn} is a two-element string array, the first element names the
function @math{f} described above, and the second element names a function
to compute the Jacobian of @math{f}.  The Jacobian function must have the
form

@example
@var{jac} = j (@var{x}, @var{t})
@end example

in which @var{jac} is the matrix of partial derivatives
@tex
$$ J = {\partial f_i \over \partial x_j} = \left[\matrix{
{\partial f_1 \over \partial x_1}
  & {\partial f_1 \over \partial x_2}
  & \cdots
  & {\partial f_1 \over \partial x_N} \cr
{\partial f_2 \over \partial x_1}
  & {\partial f_2 \over \partial x_2}
  & \cdots
  & {\partial f_2 \over \partial x_N} \cr
 \vdots & \vdots & \ddots & \vdots \cr
{\partial f_3 \over \partial x_1}
  & {\partial f_3 \over \partial x_2}
  & \cdots
  & {\partial f_3 \over \partial x_N} \cr}\right]$$
@end tex
@ifinfo

@example
             | df_1  df_1       df_1 |
             | ----  ----  ...  ---- |
             | dx_1  dx_2       dx_N |
             |                       |
             | df_2  df_2       df_2 |
             | ----  ----  ...  ---- |
      df_i   | dx_1  dx_2       dx_N |
jac = ---- = |                       |
      dx_j   |  .    .     .    .    |
             |  .    .      .   .    |
             |  .    .       .  .    |
             |                       |
             | df_N  df_N       df_N |
             | ----  ----  ...  ---- |
             | dx_1  dx_2       dx_N |
@end example

@end ifinfo

The second and third arguments specify the intial state of the system,
@math{x_0}, and the initial value of the independent variable @math{t_0}.

The fourth argument is optional, and may be used to specify a set of
times that the ODE solver should not integrate past.  It is useful for
avoiding difficulties with singularities and points where there is a
discontinuity in the derivative.

After a successful computation, the value of @var{istate} will be 2
(consistent with the Fortran version of @sc{Lsode}).

If the computation is not successful, @var{istate} will be something
other than 2 and @var{msg} will contain additional information.

You can use the function @code{lsode_options} to set optional
parameters for @code{lsode}.
@seealso{daspk, dassl, dasrt}
@end deftypefn
lu
-*- texinfo -*-
@deftypefn {Loadable Function} {[@var{l}, @var{u}, @var{p}] =} lu (@var{a})
@cindex LU decomposition
Compute the LU decomposition of @var{a}, using subroutines from
@sc{Lapack}.  The result is returned in a permuted form, according to
the optional return value @var{p}.  For example, given the matrix
@code{a = [1, 2; 3, 4]},

@example
[l, u, p] = lu (a)
@end example

@noindent
returns

@example
l =

  1.00000  0.00000
  0.33333  1.00000

u =

  3.00000  4.00000
  0.00000  0.66667

p =

  0  1
  1  0
@end example

The matrix is not required to be square.
@end deftypefn
luinc
-*- texinfo -*-
@deftypefn {Loadable Function} {[@var{l}, @var{u}, @var{p}, @var{q}] =} luinc (@var{a}, '0')
@deftypefnx {Loadable Function} {[@var{l}, @var{u}, @var{p}, @var{q}] =} luinc (@var{a}, @var{droptol})
@deftypefnx {Loadable Function} {[@var{l}, @var{u}, @var{p}, @var{q}] =} luinc (@var{a}, @var{opts})
@cindex LU decomposition
Produce the incomplete LU factorization of the sparse matrix @var{a}.
Two types of incomplete factorization are possible, and the type
is determined by the second argument to @dfn{luinc}.

Called with a second argument of '0', the zero-level incomplete
LU factorization is produced. This creates a factorization of @var{a}
where the position of the non-zero arguments correspond to the same
positions as in the matrix @var{a}.

Alternatively, the fill-in of the incomplete LU factorization can
be controlled through the variable @var{droptol} or the structure
@var{opts}. The UMFPACK multifrontal factorization code by Tim A.
Davis is used for the incomplete LU factorication, (availability
@url{http://www.cise.ufl.edu/research/sparse/umfpack/})

@var{droptol} determines the values below which the values in the LU
factorization are dropped and replaced by zero. It must be a positive
scalar, and any values in the factorization whose absolute value are
less than this value are dropped, expect if leaving them increase the
sparsity of the matrix. Setting @var{droptol} to zero results in a
complete LU factorization which is the default.

@var{opts} is a structure containing one or more of the fields

@table @code
@item droptol
The drop tolerance as above. If @var{opts} only contains @code{droptol}
then this is equivalent to using the variable @var{droptol}.

@item milu
A logical variable flagging whether to use the modified incomplete LU
factorization. In the case that @code{milu} is true, the dropped values
are subtract from the diagonal of the matrix U of the factorization.
The default is @code{false}.

@item udiag
A logical variable that flags whether zero elements on the diagonal of U
should be replaced with @var{droptol} to attempt to avoid singular
factors. The default is @code{false}.

@item thresh
Defines the pivot threshold in the interval [0,1]. Values outside that
range are ignored.
@end table

All other fields in @var{opts} are ignored. The outputs from @dfn{luinc}
are the same as for @dfn{lu}.
@seealso{sparse, lu, cholinc}
@end deftypefn
abs
-*- texinfo -*-
@deftypefn {Mapping Function} {} abs (@var{z})
Compute the magnitude of @var{z}, defined as
@iftex
@tex
$|z| = \sqrt{x^2 + y^2}$.
@end tex
@end iftex
@ifinfo
|@var{z}| = @code{sqrt (x^2 + y^2)}.
@end ifinfo

For example,

@example
@group
abs (3 + 4i)
     @result{} 5
@end group
@end example
@end deftypefn
acos
-*- texinfo -*-
@deftypefn {Mapping Function} {} acos (@var{x})
Compute the inverse cosine of each element of @var{x}.
@end deftypefn
acosh
-*- texinfo -*-
@deftypefn {Mapping Function} {} acosh (@var{x})
Compute the inverse hyperbolic cosine of each element of @var{x}.
@end deftypefn
angle
-*- texinfo -*-
@deftypefn {Mapping Function} {} angle (@var{z})
See arg.
@end deftypefn
arg
-*- texinfo -*-
@deftypefn {Mapping Function} {} arg (@var{z})
@deftypefnx {Mapping Function} {} angle (@var{z})
Compute the argument of @var{z}, defined as
@iftex
@tex
$\theta = \tan^{-1}(y/x)$.
@end tex
@end iftex
@ifinfo
@var{theta} = @code{atan (@var{y}/@var{x})}.
@end ifinfo
@noindent
in radians. 

For example,

@example
@group
arg (3 + 4i)
     @result{} 0.92730
@end group
@end example
@end deftypefn
asin
-*- texinfo -*-
@deftypefn {Mapping Function} {} asin (@var{x})
Compute the inverse sine of each element of @var{x}.
@end deftypefn
asinh
-*- texinfo -*-
@deftypefn {Mapping Function} {} asinh (@var{x})
Compute the inverse hyperbolic sine of each element of @var{x}.
@end deftypefn
atan
-*- texinfo -*-
@deftypefn {Mapping Function} {} atan (@var{x})
Compute the inverse tangent of each element of @var{x}.
@end deftypefn
atanh
-*- texinfo -*-
@deftypefn {Mapping Function} {} atanh (@var{x})
Compute the inverse hyperbolic tangent of each element of @var{x}.
@end deftypefn
ceil
-*- texinfo -*-
@deftypefn {Mapping Function} {} ceil (@var{x})
Return the smallest integer not less than @var{x}.  If @var{x} is
complex, return @code{ceil (real (@var{x})) + ceil (imag (@var{x})) * I}.
@end deftypefn
conj
-*- texinfo -*-
@deftypefn {Mapping Function} {} conj (@var{z})
Return the complex conjugate of @var{z}, defined as
@iftex
@tex
$\bar{z} = x - iy$.
@end tex
@end iftex
@ifinfo
@code{conj (@var{z})} = @var{x} - @var{i}@var{y}.
@end ifinfo
@seealso{real, imag}
@end deftypefn
cos
-*- texinfo -*-
@deftypefn {Mapping Function} {} cos (@var{x})
Compute the cosine of each element of @var{x}.
@end deftypefn
cosh
-*- texinfo -*-
@deftypefn {Mapping Function} {} cosh (@var{x})
Compute the hyperbolic cosine of each element of @var{x}.
@end deftypefn
erf
-*- texinfo -*-
@deftypefn {Mapping Function} {} erf (@var{z})
Computes the error function,
@iftex
@tex
$$
 {\rm erf} (z) = {2 \over \sqrt{\pi}}\int_0^z e^{-t^2} dt
$$
@end tex
@end iftex
@ifinfo

@smallexample
                         z
                        /
erf (z) = (2/sqrt (pi)) | e^(-t^2) dt
                        /
                     t=0
@end smallexample
@end ifinfo
@seealso{erfc, erfinv}
@end deftypefn
erfc
-*- texinfo -*-
@deftypefn {Mapping Function} {} erfc (@var{z})
Computes the complementary error function,
@iftex
@tex
$1 - {\rm erf} (z)$.
@end tex
@end iftex
@ifinfo
@code{1 - erf (@var{z})}.
@end ifinfo
@seealso{erf, erfinv}
@end deftypefn
exp
-*- texinfo -*-
@deftypefn {Mapping Function} {} exp (@var{x})
Compute the exponential of @var{x}.  To compute the matrix exponential,
see @ref{Linear Algebra}.
@end deftypefn
finite
-*- texinfo -*-
@deftypefn {Mapping Function} {} finite (@var{x})
Return 1 for elements of @var{x} that are finite values and zero
otherwise. For example,

@example
@group
finite ([13, Inf, NA, NaN])
     @result{} [ 1, 0, 0, 0 ]
@end group
@end example
@end deftypefn
fix
-*- texinfo -*-
@deftypefn {Mapping Function} {} fix (@var{x})
Truncate @var{x} toward zero.  If @var{x} is complex, return
@code{fix (real (@var{x})) + fix (imag (@var{x})) * I}.
@end deftypefn
floor
-*- texinfo -*-
@deftypefn {Mapping Function} {} floor (@var{x})
Return the largest integer not greater than @var{x}.  If @var{x} is
complex, return @code{floor (real (@var{x})) + floor (imag (@var{x})) * I}.
@end deftypefn
gamma
-*- texinfo -*-
@deftypefn {Mapping Function} {} gamma (@var{z})
Computes the Gamma function,
@iftex
@tex
$$
 \Gamma (z) = \int_0^\infty t^{z-1} e^{-t} dt.
$$
@end tex
@end iftex
@ifinfo

@example
            infinity
            /
gamma (z) = | t^(z-1) exp (-t) dt.
            /
         t=0
@end example
@end ifinfo
@seealso{gammai, lgamma}
@end deftypefn
imag
-*- texinfo -*-
@deftypefn {Mapping Function} {} imag (@var{z})
Return the imaginary part of @var{z} as a real number.
@seealso{real, conj}
@end deftypefn
isalnum
-*- texinfo -*-
@deftypefn {Mapping Function} {} isalnum (@var{s})
Return 1 for characters that are letters or digits (@code{isalpha
(@var{s})} or @code{isdigit (@var{s})} is true).
@end deftypefn
isalpha
-*- texinfo -*-
@deftypefn {Mapping Function} {} isalpha (@var{s})
@deftypefnx {Mapping Function} {} isletter (@var{s})
Return true for characters that are letters (@code{isupper (@var{s})}
or @code{islower (@var{s})} is true).
@end deftypefn
isascii
-*- texinfo -*-
@deftypefn {Mapping Function} {} isascii (@var{s})
Return 1 for characters that are ASCII (in the range 0 to 127 decimal).
@end deftypefn
iscntrl
-*- texinfo -*-
@deftypefn {Mapping Function} {} iscntrl (@var{s})
Return 1 for control characters.
@end deftypefn
isdigit
-*- texinfo -*-
@deftypefn {Mapping Function} {} isdigit (@var{s})
Return 1 for characters that are decimal digits.
@end deftypefn
isinf
-*- texinfo -*-
@deftypefn {Mapping Function} {} isinf (@var{x})
Return 1 for elements of @var{x} that are infinite and zero
otherwise. For example,

@example
@group
isinf ([13, Inf, NA, NaN])
     @result{} [ 0, 1, 0, 0 ]
@end group
@end example
@end deftypefn
isgraph
-*- texinfo -*-
@deftypefn {Mapping Function} {} isgraph (@var{s})
Return 1 for printable characters (but not the space character).
@end deftypefn
islower
-*- texinfo -*-
@deftypefn {Mapping Function} {} islower (@var{s})
Return 1 for characters that are lower case letters.
@end deftypefn
isna
-*- texinfo -*-
@deftypefn {Mapping Function} {} isna (@var{x})
Return 1 for elements of @var{x} that are NA (missing) values and zero
otherwise.  For example,

@example
@group
isna ([13, Inf, NA, NaN])
     @result{} [ 0, 0, 1, 0 ]
@end group
@end example
@end deftypefn
isnan
-*- texinfo -*-
@deftypefn {Mapping Function} {} isnan (@var{x})
Return 1 for elements of @var{x} that are NaN values and zero
otherwise.  NA values are also considered NaN values.  For example,

@example
@group
isnan ([13, Inf, NA, NaN])
     @result{} [ 0, 0, 1, 1 ]
@end group
@end example
@end deftypefn
isprint
-*- texinfo -*-
@deftypefn {Mapping Function} {} isprint (@var{s})
Return 1 for printable characters (including the space character).
@end deftypefn
ispunct
-*- texinfo -*-
@deftypefn {Mapping Function} {} ispunct (@var{s})
Return 1 for punctuation characters.
@end deftypefn
isspace
-*- texinfo -*-
@deftypefn {Mapping Function} {} isspace (@var{s})
Return 1 for whitespace characters (space, formfeed, newline,
carriage return, tab, and vertical tab).
@end deftypefn
isupper
-*- texinfo -*-
@deftypefn {Mapping Function} {} isupper (@var{s})
Return 1 for upper case letters.
@end deftypefn
isxdigit
-*- texinfo -*-
@deftypefn {Mapping Function} {} isxdigit (@var{s})
Return 1 for characters that are hexadecimal digits.
@end deftypefn
lgamma
-*- texinfo -*-
@deftypefn {Mapping Function} {} lgamma (@var{x})
@deftypefnx {Mapping Function} {} gammaln (@var{x})
Return the natural logarithm of the gamma function.
@seealso{gamma, gammai}
@end deftypefn
log
-*- texinfo -*-
@deftypefn {Mapping Function} {} log (@var{x})
Compute the natural logarithm for each element of @var{x}.  To compute the
matrix logarithm, see @ref{Linear Algebra}.
@seealso{log2, log10, logspace, exp}
@end deftypefn
log10
-*- texinfo -*-
@deftypefn {Mapping Function} {} log10 (@var{x})
Compute the base-10 logarithm for each element of @var{x}.
@seealso{log, log2, logspace, exp}
@end deftypefn
real
-*- texinfo -*-
@deftypefn {Mapping Function} {} real (@var{z})
Return the real part of @var{z}.
@seealso{imag, conj}
@end deftypefn
round
-*- texinfo -*-
@deftypefn {Mapping Function} {} round (@var{x})
Return the integer nearest to @var{x}.  If @var{x} is complex, return
@code{round (real (@var{x})) + round (imag (@var{x})) * I}.
@seealso{rem}
@end deftypefn
sign
-*- texinfo -*-
@deftypefn {Mapping Function} {} sign (@var{x})
Compute the @dfn{signum} function, which is defined as
@iftex
@tex
$$
{\rm sign} (@var{x}) = \cases{1,&$x>0$;\cr 0,&$x=0$;\cr -1,&$x<0$.\cr}
$$
@end tex
@end iftex
@ifinfo

@example
           -1, x < 0;
sign (x) =  0, x = 0;
            1, x > 0.
@end example
@end ifinfo

For complex arguments, @code{sign} returns @code{x ./ abs (@var{x})}.
@end deftypefn
sin
-*- texinfo -*-
@deftypefn {Mapping Function} {} sin (@var{x})
Compute the sine of each element of @var{x}.
@end deftypefn
sinh
-*- texinfo -*-
@deftypefn {Mapping Function} {} sinh (@var{x})
Compute the hyperbolic sine of each element of @var{x}.
@end deftypefn
sqrt
-*- texinfo -*-
@deftypefn {Mapping Function} {} sqrt (@var{x})
Compute the square root of @var{x}.  If @var{x} is negative, a complex
result is returned.  To compute the matrix square root, see
@ref{Linear Algebra}.
@end deftypefn
tan
-*- texinfo -*-
@deftypefn {Mapping Function} {} tan (@var{z})
Compute tangent of each element of @var{x}.
@end deftypefn
tanh
-*- texinfo -*-
@deftypefn {Mapping Function} {} tanh (@var{x})
Compute hyperbolic tangent of each element of @var{x}.
@end deftypefn
toascii
-*- texinfo -*-
@deftypefn {Mapping Function} {} toascii (@var{s})
Return ASCII representation of @var{s} in a matrix.  For example,

@example
@group
toascii ("ASCII")
     @result{} [ 65, 83, 67, 73, 73 ]
@end group

@end example
@end deftypefn
tolower
-*- texinfo -*-
@deftypefn {Mapping Function} {} tolower (@var{s})
Return a copy of the string @var{s}, with each upper-case character
replaced by the corresponding lower-case one; nonalphabetic characters
are left unchanged.  For example,

@example
tolower ("MiXeD cAsE 123")
     @result{} "mixed case 123"
@end example
@end deftypefn
toupper
-*- texinfo -*-
@deftypefn {Built-in Function} {} toupper (@var{s})
Return a copy of the string @var{s}, with each  lower-case character
replaced by the corresponding upper-case one; nonalphabetic characters
are left unchanged.  For example,

@example
@group
toupper ("MiXeD cAsE 123")
     @result{} "MIXED CASE 123"
@end group
@end example
@end deftypefn
matrix_type
-*- texinfo -*-
@deftypefn {Loadable Function} {@var{type} =} matrix_type (@var{a})
@deftypefnx {Loadable Function} {@var{a} =} matrix_type (@var{a}, @var{type})
@deftypefnx {Loadable Function} {@var{a} =} matrix_type (@var{a}, 'upper', @var{perm})
@deftypefnx {Loadable Function} {@var{a} =} matrix_type (@var{a}, 'lower', @var{perm})
@deftypefnx {Loadable Function} {@var{a} =} matrix_type (@var{a}, 'banded', @var{nl}, @var{nu})
Identify the matrix type or mark a matrix as a particular type. This allows rapid
for solutions of linear equations involving @var{a} to be performed. Called with a
single argument, @code{matrix_type} returns the type of the matrix and caches it for
future use. Called with more than one argument, @code{matrix_type} allows the type
of the matrix to be defined.

The possible matrix types depend on whether the matrix is full or sparse, and can be
one of the following

@table @asis
@item 'unknown'
Remove any previously cached matrix type, and mark type as unknown

@item 'full'
Mark the matrix as full.

@item 'positive definite'
Full positive definite matrix.

@item 'diagonal'
Diagonal Matrix. (Sparse matrices only)

@item 'permuted diagonal'
Permuted Diagonal matrix. The permutation does not need to be specifically
indicated, as the structure of the matrix explicitly gives this. (Sparse matrices
only)

@item 'upper'
Upper triangular. If the optional third argument @var{perm} is given, the matrix is
assumed to be a permuted upper triangular with the permutations defined by the
vector @var{perm}.

@item 'lower'
Lower triangular. If the optional third argument @var{perm} is given, the matrix is
assumed to be a permuted lower triangular with the permutations defined by the
vector @var{perm}.

@item 'banded'
@itemx 'banded positive definite'
Banded matrix with the band size of @var{nl} below the diagonal and @var{nu} above
it. If @var{nl} and @var{nu} are 1, then the matrix is tridiagonal and treated
with specialized code. In addition the matrix can be marked as positive definite
(Sparse matrices only)

@item 'singular'
The matrix is assumed to be singular and will be treated with a minimum norm solution

@end table

Note that the matrix type will be discovered automatically on the first attempt to
solve a linear equation involving @var{a}. Therefore @code{matrix_type} is only
useful to give Octave hints of the matrix type. Incorrectly defining the
matrix type will result in incorrect results from solutions of linear equations,
and so it is entirely the responsibility of the user to correctly indentify the
matrix type.
@end deftypefn
md5sum
-*- texinfo -*-
@deftypefn {Loadable Function} {} md5sum (@var{file})
@deftypefnx {Loadable Function} {} md5sum (@var{str}, @var{opt})
Calculates the MD5 sum of the file @var{file}. If the second parameter
@var{opt} exists and is true, then calculate the MD5 sum of the
string @var{str}.
@end deftypefn
min
-*- texinfo -*-
@deftypefn {Mapping Function} {} min (@var{x}, @var{y}, @var{dim})
@deftypefnx {Mapping Function} {[@var{w}, @var{iw}] =} min (@var{x})
@cindex Utility Functions
For a vector argument, return the minimum value.  For a matrix
argument, return the minimum value from each column, as a row
vector, or over the dimension @var{dim} if defined. For two matrices
(or a matrix and scalar), return the pair-wise minimum.
Thus,

@example
min (min (@var{x}))
@end example

@noindent
returns the smallest element of @var{x}, and

@example
@group
min (2:5, pi)
    @result{}  2.0000  3.0000  3.1416  3.1416
@end group
@end example
@noindent
compares each element of the range @code{2:5} with @code{pi}, and
returns a row vector of the minimum values.

For complex arguments, the magnitude of the elements are used for
comparison.

If called with one input and two output arguments,
@code{min} also returns the first index of the
minimum value(s). Thus,

@example
@group
[x, ix] = min ([1, 3, 0, 2, 5])
    @result{}  x = 0
        ix = 3
@end group
@end example
@end deftypefn
max
-*- texinfo -*-
@deftypefn {Mapping Function} {} max (@var{x}, @var{y}, @var{dim})
@deftypefnx {Mapping Function} {[@var{w}, @var{iw}] =} max (@var{x})
@cindex Utility Functions
For a vector argument, return the maximum value.  For a matrix
argument, return the maximum value from each column, as a row
vector, or over the dimension @var{dim} if defined. For two matrices
(or a matrix and scalar), return the pair-wise maximum.
Thus,

@example
max (max (@var{x}))
@end example

@noindent
returns the largest element of @var{x}, and

@example
@group
max (2:5, pi)
    @result{}  3.1416  3.1416  4.0000  5.0000
@end group
@end example
@noindent
compares each element of the range @code{2:5} with @code{pi}, and
returns a row vector of the maximum values.

For complex arguments, the magnitude of the elements are used for
comparison.

If called with one input and two output arguments,
@code{max} also returns the first index of the
maximum value(s). Thus,

@example
@group
[x, ix] = max ([1, 3, 5, 2, 5])
    @result{}  x = 5
        ix = 3
@end group
@end example
@end deftypefn
edit_history
-*- texinfo -*-
@deffn {Command} edit_history options
If invoked with no arguments, @code{edit_history} allows you to edit the
history list using the editor named by the variable @code{EDITOR}.  The
commands to be edited are first copied to a temporary file.  When you
exit the editor, Octave executes the commands that remain in the file.
It is often more convenient to use @code{edit_history} to define functions 
rather than attempting to enter them directly on the command line.
By default, the block of commands is executed as soon as you exit the
editor.  To avoid executing any commands, simply delete all the lines
from the buffer before exiting the editor.

The @code{edit_history} command takes two optional arguments specifying
the history numbers of first and last commands to edit.  For example,
the command

@example
edit_history 13
@end example

@noindent
extracts all the commands from the 13th through the last in the history
list.  The command

@example
edit_history 13 169
@end example

@noindent
only extracts commands 13 through 169.  Specifying a larger number for
the first command than the last command reverses the list of commands
before placing them in the buffer to be edited.  If both arguments are
omitted, the previous command in the history list is used.
@end deffn
history
-*- texinfo -*-
@deffn {Command} history options
If invoked with no arguments, @code{history} displays a list of commands
that you have executed.  Valid options are:

@table @code
@item -w @var{file}
Write the current history to the file @var{file}.  If the name is
omitted, use the default history file (normally @file{~/.octave_hist}).

@item -r @var{file}
Read the file @var{file}, replacing the current history list with its
contents.  If the name is omitted, use the default history file
(normally @file{~/.octave_hist}).

@item @var{n}
Only display the most recent @var{n} lines of history.

@item -q
Don't number the displayed lines of history.  This is useful for cutting
and pasting commands if you are using the X Window System.
@end table

For example, to display the five most recent commands that you have
typed without displaying line numbers, use the command
@kbd{history -q 5}.
@end deffn
run_history
-*- texinfo -*-
@deffn {Command} run_history [first] [last]
Similar to @code{edit_history}, except that the editor is not invoked,
and the commands are simply executed as they appear in the history list.
@end deffn
history_size
-*- texinfo -*-
@deftypefn {Built-in Function} {@var{val} =} history_size ()
@deftypefnx {Built-in Function} {@var{old_val} =} history_size (@var{new_val})
Query or set the internal variable that specifies how many entries
to store in the history file.  The default value is @code{1024},
but may be overridden by the environment variable @code{OCTAVE_HISTSIZE}.
@seealso{history_file, history_timestamp_format, saving_history}
@end deftypefn
history_file
-*- texinfo -*-
@deftypefn {Built-in Function} {@var{val} =} history_file ()
@deftypefnx {Built-in Function} {@var{old_val} =} history_file (@var{new_val})
Query or set the internal variable that specifies the name of the
file used to store command history.  The default value is
@code{"~/.octave_hist"}, but may be overridden by the environment
variable @code{OCTAVE_HISTFILE}.
@seealso{history_size, saving_history, history_timestamp_format_string}
@end deftypefn
history_timestamp_format_string
-*- texinfo -*-
@deftypefn {Built-in Function} {@var{val} =} history_timestamp_format_string ()
@deftypefnx {Built-in Function} {@var{old_val} =} history_timestamp_format_string (@var{new_val})
Query or set the internal variable that specifies the format string
for the comment line that is written to the history file when Octave
exits.  The format string is passed to @code{strftime}.  The default
value is

@example
"# Octave VERSION, %a %b %d %H:%M:%S %Y %Z <USER@@HOST>"
@end example
@seealso{strftime, history_file, history_size, saving_history}
@end deftypefn
saving_history
-*- texinfo -*-
@deftypefn {Built-in Function} {@var{val} =} saving_history ()
@deftypefnx {Built-in Function} {@var{old_val} =} saving_history (@var{new_val})
Query or set the internal variable that controls whether commands entered
on the command line are saved in the history file.
@seealso{history_file, history_size, history_timestamp_format}
@end deftypefn
__version_info__
-*- texinfo -*-
@deftypefn {Built-in Function} {retval =} __version_info__ (@var{name}, @var{version}, @var{release}, @var{date})
@end deftypefn
argv
-*- texinfo -*-
@deftypefn {Built-in Function} {} argv ()
Return the command line arguments passed to Octave.  For example,
if you invoked Octave using the command

@example
octave --no-line-editing --silent
@end example

@noindent
@code{argv} would return a cell array of strings with the elements
@code{--no-line-editing} and @code{--silent}.

If you write an executable Octave script, @code{argv} will return the
list of arguments passed to the script.  @xref{Executable Octave Programs},
for an example of how to create an executable Octave script.
@end deftypefn
program_invocation_name
-*- texinfo -*-
@deftypefn {Built-in Function} program_invocation_name ()
Return the name that was typed at the shell prompt to run Octave.

If executing a script from the command line (e.g., @code{octave foo.m})
or using an executable Octave script, the program name is set to the
name of the script.  @xref{Executable Octave Programs}, for an example of
how to create an executable Octave script.
@seealso{program_name}
@end deftypefn
program_name
-*- texinfo -*-
@deftypefn {Built-in Function} {} program_name ()
Return the last component of of the value returned by
@code{program_invocation_name}.
@seealso{program_invocation_name}
@end deftypefn
print_answer_id_name
-*- texinfo -*-
@deftypefn {Built-in Function} {@var{val} =} print_answer_id_name ()
@deftypefnx {Built-in Function} {@var{old_val} =} print_answer_id_name (@var{new_val})
Query or set the internal variable that controls whether variable
names are printed along with results produced by evaluating an expression.
@end deftypefn
silent_functions
-*- texinfo -*-
@deftypefn {Built-in Function} {@var{val} =} silent_functions ()
@deftypefnx {Built-in Function} {@var{old_val} =} silent_functions (@var{new_val})
Query or set the internal variable that controls whether internal
output from a function is suppressed.  If this option is disabled,
Octave will display the results produced by evaluating expressions
within a function body that are not terminated with a semicolon.
@end deftypefn
iscell
-*- texinfo -*-
@deftypefn {Built-in Function} {} iscell (@var{x})
Return true if @var{x} is a cell array object.  Otherwise, return
false.
@end deftypefn
cell
-*- texinfo -*-
@deftypefn {Built-in Function} {} cell (@var{x})
@deftypefnx {Built-in Function} {} cell (@var{n}, @var{m})
Create a new cell array object.  If invoked with a single scalar
argument, @code{cell} returns a square cell array with the dimension
specified.  If you supply two scalar arguments, @code{cell} takes
them to be the number of rows and columns.  If given a vector with two
elements, @code{cell} uses the values of the elements as the number of
rows and columns, respectively.
@end deftypefn
iscellstr
-*- texinfo -*-
@deftypefn {Built-in Function} {} iscellstr (@var{cell})
Return true if every element of the cell array @var{cell} is a
character string
@end deftypefn
cellstr
-*- texinfo -*-
@deftypefn {Built-in Function} {} cellstr (@var{string})
Create a new cell array object from the elements of the string
array @var{string}.
@end deftypefn
struct2cell
-*- texinfo -*-
@deftypefn {Built-in Function} {} struct2cell (@var{S})
Create a new cell array from the objects stored in the struct object.
If @var{f} is the number of fields in the structure, the resulting
cell array will have a dimension vector corresponding to
@code{[@var{F} size(@var{S})]}.
@seealso{cell2struct, fieldnames}
@end deftypefn
functions
-*- texinfo -*-
@deftypefn {Built-in Function} {} functions (@var{fcn_handle})
Return a struct containing information about the function handle
@var{fcn_handle}.
@end deftypefn
func2str
-*- texinfo -*-
@deftypefn {Built-in Function} {} func2str (@var{fcn_handle})
Return a string containing the name of the function referenced by
the function handle @var{fcn_handle}.
@end deftypefn
str2func
-*- texinfo -*-
@deftypefn {Built-in Function} {} str2func (@var{fcn_name})
Return a function handle constructed from the string @var{fcn_name}.
@end deftypefn
inline
-*- texinfo -*-
@deftypefn {Built-in Function} {} inline (@var{str})
@deftypefnx {Built-in Function} {} inline (@var{str}, @var{arg1}, @dots{})
@deftypefnx {Built-in Function} {} inline (@var{str}, @var{n})
Create an inline function from the character string @var{str}.
If called with a single argument, the arguments of the generated
function are extracted from the function itself. The generated
function arguments will then be in alphabetical order. It should
be noted that i, and j are ignored as arguments due to the
ambiguity between their use as a variable or their use as an inbuilt
constant. All arguments followed by a parentheses are considered
to be functions.

If the second and subsequent arguments are character strings,
they are the names of the arguments of the function.

If the second argument is an integer @var{n}, the arguments are
@code{"x"}, @code{"P1"}, @dots{}, @code{"P@var{N}"}.
@seealso{argnames, formula, vectorize}
@end deftypefn
formula
-*- texinfo -*-
@deftypefn {Built-in Function} {} formula (@var{fun})
Return a character string representing the inline function @var{fun}.
Note that @code{char (@var{fun})} is equivalent to
@code{formula (@var{fun})}.
@seealso{argnames, inline, vectorize}
@end deftypefn
argnames
-*- texinfo -*-
@deftypefn {Built-in Function} {} argnames (@var{fun})
Return a cell array of character strings containing the names of
the arguments of the inline function @var{fun}.
@seealso{inline, formula, vectorize}
@end deftypefn
vectorize
-*- texinfo -*-
@deftypefn {Built-in Function} {} vectorize (@var{fun})
Create a vectorized version of the inline function @var{fun}
by replacing all occurrences of @code{*}, @code{/}, etc., with
@code{.*}, @code{./}, etc.
@end deftypefn
int16
-*- texinfo -*-
@deftypefn {Built-in Function} {} int16 (@var{x})
Convert @var{x} to 16-bit integer type.
@end deftypefn
int32
-*- texinfo -*-
@deftypefn {Built-in Function} {} int32 (@var{x})
Convert @var{x} to 32-bit integer type.
@end deftypefn
int64
-*- texinfo -*-
@deftypefn {Built-in Function} {} int64 (@var{x})
Convert @var{x} to 64-bit integer type.
@end deftypefn
int8
-*- texinfo -*-
@deftypefn {Built-in Function} {} int8 (@var{x})
Convert @var{x} to 8-bit integer type.
@end deftypefn
list
-*- texinfo -*-
@deftypefn {Built-in Function} {} list (@var{a1}, @var{a2}, @dots{})
Create a new list with elements given by the arguments @var{a1},
@var{a2}, @dots{}.
@end deftypefn
nth
-*- texinfo -*-
@deftypefn {Built-in Function} {} nth (@var{list}, @var{n})
Return the @var{n}-th element of @var{list}.
@end deftypefn
append
-*- texinfo -*-
@deftypefn {Built-in Function} {} append (@var{list}, @var{a1}, @var{a2}, @dots{})
Return a new list created by appending @var{a1}, @var{a2}, @dots{}, to
@var{list}.  If any of the arguments to be appended is a list, its
elements are appended individually.  For example,

@example
x = list (1, 2);
y = list (3, 4);
append (x, y);
@end example

@noindent
results in the list containing the four elements @samp{(1 2 3 4)}, not
a list containing the three elements @samp{(1 2 (3 4))}.
@end deftypefn
reverse
-*- texinfo -*-
@deftypefn {Built-in Function} {} reverse (@var{list})
Return a new list created by reversing the elements of @var{list}.
@end deftypefn
splice
-*- texinfo -*-
@deftypefn {Built-in Function} {} splice (@var{list_1}, @var{offset}, @var{length}, @var{list_2})
Replace @var{length} elements of @var{list_1} beginning at
@var{offset} with the contents of @var{list_2} (if any).  If
@var{length} is omitted, all elements from @var{offset} to the end of
@var{list_1} are replaced.  As a special case, if @var{offset} is one
greater than the length of @var{list_1} and @var{length} is 0, splice
is equivalent to @code{append (@var{list_1}, @var{list_2})}.
@end deftypefn
double
-*- texinfo -*-
@deftypefn {Built-in Function} {} double (@var{x})
Convert @var{x} to double precision type.
@end deftypefn
isstreamoff
-*- texinfo -*-
@deftypefn {Built-in Function} {} isstreamoff (@var{x})
Return true if @var{x} is a streamoff object.  Otherwise, return
false.
@end deftypefn
streamoff
-*- texinfo -*-
@deftypefn {Built-in Function} {} streamoff (@var{x})
@deftypefnx {Built-in Function} {} streamoff (@var{n}, @var{m})
Create a new streamoff array object.  If invoked with a single scalar
argument, @code{streamoff} returns a square streamoff array with
the dimension specified.  If you supply two scalar arguments,
@code{streamoff} takes them to be the number of rows and columns.
If given a vector with two elements, @code{streamoff} uses the values
of the elements as the number of rows and columns, respectively.
@end deftypefn
struct
-*- texinfo -*-
@deftypefn {Built-in Function} {} struct ("field", @var{value}, "field", @var{value}, @dots{})

Create a structure and initialize its value.

If the values are cell arrays, create a structure array and initialize
its values.  The dimensions of each cell array of values must match.
Singleton cells and non-cell values are repeated so that they fill
the entire array.  If the cells are empty, create an empty structure
array with the specified field names.
@end deftypefn
isstruct
-*- texinfo -*-
@deftypefn {Built-in Function} {} isstruct (@var{expr})
Return 1 if the value of the expression @var{expr} is a structure.
@end deftypefn
fieldnames
-*- texinfo -*-
@deftypefn {Built-in Function} {} fieldnames (@var{struct})
Return a cell array of strings naming the elements of the structure
@var{struct}.  It is an error to call @code{fieldnames} with an
argument that is not a structure.
@end deftypefn
isfield
-*- texinfo -*-
@deftypefn {Built-in Function} {} isfield (@var{expr}, @var{name})
Return true if the expression @var{expr} is a structure and it includes an
element named @var{name}.  The first argument must be a structure and
the second must be a string.
@end deftypefn
cell2struct
-*- texinfo -*-
@deftypefn {Built-in Function} {} cell2struct (@var{cell}, @var{fields}, @var{dim})
Convert @var{cell} to a structure. The number of fields in @var{fields}
must match the number of elements in @var{cell} along dimension @var{dim},
that is @code{numel (@var{fields}) == size (@var{cell}, @var{dim})}.

@example
@group
A = cell2struct (@{'Peter', 'Hannah', 'Robert'; 185, 170, 168@},
                 @{'Name','Height'@}, 1);
A(1)
@result{} ans =
      @{
        Height = 185
        Name   = Peter
      @}

@end group
@end example
@end deftypefn
rmfield
-*- texinfo -*-
@deftypefn {Built-in Function} {} rmfield (@var{s}, @var{f})
Remove field @var{f} from the structure @var{s}.  If @var{f} is a
cell array of character strings or a character array, remove the
named fields.
@seealso{cellstr, iscellstr, setfield}
@end deftypefn
typeinfo
-*- texinfo -*-
@deftypefn {Built-in Function} {} typeinfo (@var{expr})

Return the type of the expression @var{expr}, as a string.  If
@var{EXPR}  is omitted, return an array of strings containing all the
currently installed data types.
@end deftypefn
class
-*- texinfo -*-
@deftypefn {Built-in Function} {} class (@var{expr})

Return the class of the expression @var{expr}, as a string.
@end deftypefn
uint16
-*- texinfo -*-
@deftypefn {Built-in Function} {} uint16 (@var{x})
Convert @var{x} to unsigned 16-bit integer type.
@end deftypefn
uint32
-*- texinfo -*-
@deftypefn {Built-in Function} {} uint32 (@var{x})
Convert @var{x} to unsigned 32-bit integer type.
@end deftypefn
uint64
-*- texinfo -*-
@deftypefn {Built-in Function} {} uint64 (@var{x})
Convert @var{x} to unsigned 64-bit integer type.
@end deftypefn
uint8
-*- texinfo -*-
@deftypefn {Built-in Function} {} uint8 (@var{x})
Convert @var{x} to unsigned 8-bit integer type.
@end deftypefn
nargin
-*- texinfo -*-
@deftypefn {Built-in Function} {} nargin ()
@deftypefnx {Built-in Function} {} nargin (@var{fcn_name})
Within a function, return the number of arguments passed to the function.
At the top level, return the number of command line arguments passed to
Octave.  If called with the optional argument @var{fcn_name}, return the
maximum number of arguments the named function can accept, or -1 if the
function accepts a variable number of arguments.
@seealso{nargout, varargin, varargout}
@end deftypefn
nargout
-*- texinfo -*-
@deftypefn {Built-in Function} {} nargout ()
@deftypefnx {Built-in Function} {} nargout (@var{fcn_name})
Within a function, return the number of values the caller expects to
receive.  If called with the optional argument @var{fcn_name}, return the
maximum number of values the named function can produce, or -1 if the
function can produce a variable number of values.

For example,

@example
f ()
@end example

@noindent
will cause @code{nargout} to return 0 inside the function @code{f} and

@example
[s, t] = f ()
@end example

@noindent
will cause @code{nargout} to return 2 inside the function
@code{f}.

At the top level, @code{nargout} is undefined.
@seealso{nargin, varargin, varargout}
@end deftypefn
max_recursion_depth
-*- texinfo -*-
@deftypefn {Built-in Function} {@var{val} =} max_recursion_depth ()
@deftypefnx {Built-in Function} {@var{old_val} =} max_recursion_depth (@var{new_val})
Query or set the internal limit on the number of times a function may
be called recursively.  If the limit is exceeded, an error message is
printed and control returns to the top level.
@end deftypefn
sizeof
-*- texinfo -*-
@deftypefn {Built-in Function} {} sizeof (@var{val})
Return the size of @var{val} in bytes
@end deftypefn
subsref
-*- texinfo -*-
@deftypefn {Built-in Function} {} subsref (@var{val}, @var{idx})
Perform the subscripted element selection operation according to
the subscript specified by @var{idx}.

The subscript @var{idx} is expected to be a structure array with
fields @samp{type} and @samp{subs}.  Valid values for @samp{type}
are @samp{"()"}, @samp{"@{@}"}, and @samp{"."}.
The @samp{subs} field may be either @samp{":"} or a cell array
of index values.

The following example shows how to extract the two first columns of
a matrix

@example
val = magic(3)
     @result{} val = [ 8   1   6
                3   5   7
                4   9   2 ]
idx.type = "()";
idx.subs = @{":", 1:2@};
subsref(val, idx)
     @result{} [ 8   1 
          3   5 
          4   9 ]
@end example

@noindent
Note that this is the same as writing @code{val(:,1:2)}.
@seealso{subsasgn, substruct}
@end deftypefn
subsasgn
-*- texinfo -*-
@deftypefn {Built-in Function} {} subsasgn (@var{val}, @var{idx}, @var{rhs})
Perform the subscripted assignment operation according to
the subscript specified by @var{idx}.

The subscript @var{idx} is expected to be a structure array with
fields @samp{type} and @samp{subs}.  Valid values for @samp{type}
are @samp{"()"}, @samp{"@{@}"}, and @samp{"."}.
The @samp{subs} field may be either @samp{":"} or a cell array
of index values.

The following example shows how to set the two first columns of a
3-by-3 matrix to zero.

@example
val = magic(3);
idx.type = "()";
idx.subs = @{":", 1:2@};
subsasgn (val, idx, 0)
     @result{} [ 0   0   6
          0   0   7
          0   0   2 ]
@end example

Note that this is the same as writing @code{val(:,1:2) = 0}.
@seealso{subsref, substruct}
@end deftypefn
diary
-*- texinfo -*-
@deffn {Command} diary options
Create a list of all commands @emph{and} the output they produce, mixed
together just as you see them on your terminal.  Valid options are:

@table @code
@item on
Start recording your session in a file called @file{diary} in your
current working directory.

@item off
Stop recording your session in the diary file.

@item @var{file}
Record your session in the file named @var{file}.
@end table

Without any arguments, @code{diary} toggles the current diary state.
@end deffn
more
-*- texinfo -*-
@deffn {Command} more
@deffnx {Command} more on
@deffnx {Command} more off
Turn output pagination on or off.  Without an argument, @code{more}
toggles the current state.
@end deffn
terminal_size
-*- texinfo -*-
@deftypefn {Built-in Function} {} terminal_size ()
Return a two-element row vector containing the current size of the
terminal window in characters (rows and columns).
@seealso{list_in_columns}
@end deftypefn
page_output_immediately
-*- texinfo -*-
@deftypefn {Built-in Function} {@var{val} =} page_output_immediately ()
@deftypefnx {Built-in Function} {@var{val} =} page_output_immediately (@var{new_val})
Query or set the internal variable that controls whether Octave sends
output to the pager as soon as it is available.  Otherwise, Octave
buffers its output and waits until just before the prompt is printed to
flush it to the pager.
@end deftypefn
page_screen_output
-*- texinfo -*-
@deftypefn {Built-in Function} {@var{val} =} page_screen_output ()
@deftypefnx {Built-in Function} {@var{old_val} =} page_screen_output (@var{new_val})
Query or set the internal variable that controls whether output intended
for the terminal window that is longer than one page is sent through a
pager.  This allows you to view one screenful at a time.  Some pagers
(such as @code{less}---see @ref{Installation}) are also capable of moving
backward on the output.
@end deftypefn
PAGER
-*- texinfo -*-
@deftypefn {Built-in Function} {@var{val} =} PAGER ()
@deftypefnx {Built-in Function} {@var{old_val} =} PAGER (@var{new_val})
Query or set the internal variable that specifies the program to use
to display terminal output on your system.  The default value is
normally @code{"less"}, @code{"more"}, or
@code{"pg"}, depending on what programs are installed on your system.
@xref{Installation}.
@seealso{more, page_screen_output, page_output_immediately, PAGER_FLAGS}
@end deftypefn
PAGER_FLAGS
-*- texinfo -*-
@deftypefn {Built-in Function} {@var{val} =} PAGER_FLAGS ()
@deftypefnx {Built-in Function} {@var{old_val} =} PAGER_FLAGS (@var{new_val})
Query or set the internal variable that specifies the options to pass
to the pager.
@seealso{PAGER}
@end deftypefn
autoload
-*- texinfo -*-
@deftypefn {Built-in Function} {} autoload (@var{function}, @var{file})
Define @var{function} to autoload from @var{file}.

The second argument, @var{file}, should be an absolute file name and
should not depend on the Octave load path.

Normally, calls to @code{autoload} appear in PKG_ADD script files that
are evaluated when a directory is added to the Octave's load path.  To
avoid having to hardcode directory names in @var{file}, it is customary
to use

@example
autoload ("foo",
          fullfile (fileparts (mfilename ("fullpath")),
                    "bar.oct"));
@end example

Uses like

@example
autoload ("foo", file_in_loadpath ("bar.oct"))
@end example

@noindent
are strongly discouraged.

With no arguments, return a structure containing the current autoload map.
@seealso{PKG_ADD}
@end deftypefn
mfilename
-*- texinfo -*-
@deftypefn {Built-in Function} {} mfilename ()
@deftypefnx {Built-in Function} {} mfilename (@code{"fullpath"})
@deftypefnx {Built-in Function} {} mfilename (@code{"fullpathext"})
Return the name of the currently executing file.  At the top-level,
return the empty string.  Given the argument @code{"fullpath"},
include the directory part of the file name, but not the extension.
Given the argument @code{"fullpathext"}, include the directory part
of the file name and the extension.
@end deftypefn
source
-*- texinfo -*-
@deftypefn {Built-in Function} {} source (@var{file})
Parse and execute the contents of @var{file}.  This is equivalent to
executing commands from a script file, but without requiring the file to
be named @file{@var{file}.m}.
@end deftypefn
feval
-*- texinfo -*-
@deftypefn {Built-in Function} {} feval (@var{name}, @dots{})
Evaluate the function named @var{name}.  Any arguments after the first
are passed on to the named function.  For example,

@example
feval ("acos", -1)
     @result{} 3.1416
@end example

@noindent
calls the function @code{acos} with the argument @samp{-1}.

The function @code{feval} is necessary in order to be able to write
functions that call user-supplied functions, because Octave does not
have a way to declare a pointer to a function (like C) or to declare a
special kind of variable that can be used to hold the name of a function
(like @code{EXTERNAL} in Fortran).  Instead, you must refer to functions
by name, and use @code{feval} to call them.
@end deftypefn
eval
-*- texinfo -*-
@deftypefn {Built-in Function} {} eval (@var{try}, @var{catch})
Parse the string @var{try} and evaluate it as if it were an Octave
program.  If that fails, evaluate the optional string @var{catch}.
The string @var{try} is evaluated in the current context,
so any results remain available after @code{eval} returns.

The following example makes the variable @var{a} with the approximate
value 3.1416 available.

@example
eval("a = acos(-1);");
@end example

If an error occurs during the evaluation of @var{try} the @var{catch}
string is evaluated, as the following example shows.

@example
eval ('error ("This is a bad example");',
      'printf ("This error occured:\n%s", lasterr ());');
     @print{} This error occured:
        error: This is a bad example
@end example
@end deftypefn
assignin
-*- texinfo -*-
@deftypefn {Built-in Function} {} assignin (@var{context}, @var{varname}, @var{value})
Assign @var{value} to @var{varname} in context @var{context}, which
may be either @code{"base"} or @code{"caller"}.
@end deftypefn
evalin
-*- texinfo -*-
@deftypefn {Built-in Function} {} evalin (@var{context}, @var{try}, @var{catch})
Like @code{eval}, except that the expressions are evaluated in the
context @var{context}, which may be either @code{"caller"} or
@code{"base"}.
@end deftypefn
pinv
-*- texinfo -*-
@deftypefn {Loadable Function} {} pinv (@var{x}, @var{tol})
Return the pseudoinverse of @var{x}.  Singular values less than
@var{tol} are ignored. 

If the second argument is omitted, it is assumed that

@example
tol = max (size (@var{x})) * sigma_max (@var{x}) * eps,
@end example

@noindent
where @code{sigma_max (@var{x})} is the maximal singular value of @var{x}.
@end deftypefn
rats
-*- texinfo -*-
@deftypefn {Built-in Function} {} rats (@var{x}, @var{len})
Convert @var{x} into a rational approximation represented as a string.
You can convert the string back into a matrix as follows:

@example
   eval(['[',rats(hilb(4)),'];'])
@end example

The optional second argument defines the maximum length of the string
representing the elements of @var{x}. By default @var{len} is 9.
@seealso{format, rat}
@end deftypefn
disp
-*- texinfo -*-
@deftypefn {Built-in Function} {} disp (@var{x})
Display the value of @var{x}.  For example,

@example
disp ("The value of pi is:"), disp (pi)

     @print{} the value of pi is:
     @print{} 3.1416
@end example

@noindent
Note that the output from @code{disp} always ends with a newline.

If an output value is requested, @code{disp} prints nothing and
returns the formatted output in a string.
@seealso{fdisp}
@end deftypefn
fdisp
-*- texinfo -*-
@deftypefn {Built-in Function} {} fdisp (@var{fid}, @var{x})
Display the value of @var{x} on the stream @var{fid}.  For example,

@example
fdisp (stdout, "The value of pi is:"), fdisp (stdout, pi)

     @print{} the value of pi is:
     @print{} 3.1416
@end example

@noindent
Note that the output from @code{fdisp} always ends with a newline.
@seealso{disp}
@end deftypefn
format
-*- texinfo -*-
@deffn {Command} format options
Control the format of the output produced by @code{disp} and Octave's
normal echoing mechanism.  Valid options are listed in the following
table.

@table @code
@item short
Octave will try to print numbers with at
least 5 significant figures within a field that is a maximum of 10
characters wide (not counting additional spacing that is added between
columns of a matrix).

If Octave is unable to format a matrix so that columns line up on the
decimal point and all the numbers fit within the maximum field width,
it switches to an @samp{e} format.

@item long
Octave will try to print numbers with at least 15 significant figures
within a field that is a maximum of 20 characters wide (not counting
additional spacing that is added between columns of a matrix).

As will the @samp{short} format, Octave will switch to an @samp{e}
format if it is unable to format a matrix so that columns line up on the
decimal point and all the numbers fit within the maximum field width.

@item long e
@itemx short e
The same as @samp{format long} or @samp{format short} but always display
output with an @samp{e} format.  For example, with the @samp{short e}
format, @code{pi} is displayed as @code{3.14e+00}.

@item long E
@itemx short E
The same as @samp{format long e} or @samp{format short e} but always
display output with an uppercase @samp{E} format.  For example, with
the @samp{long E} format, @code{pi} is displayed as
@code{3.14159265358979E+00}.
@item long g
@itemx short g
Choose between normal @samp{long} (or @samp{short}) and and
@samp{long e} (or @samp{short e}) formats based on the magnitude
of the number.  For example, with the @samp{short g} format,
@code{pi .^ [2; 4; 8; 16; 32]} is displayed as

@example
@group
ans =

      3.1416
      9.8696
      97.409
      9488.5
  9.0032e+07
  8.1058e+15
@end group
@end example

@item long G
@itemx short G
The same as @samp{format long g} or @samp{format short g} but use an
uppercase @samp{E} format.  For example, with the @samp{short G} format,
@code{pi .^ [2; 4; 8; 16; 32]} is displayed as

@example
@group
ans =

      3.1416
      9.8696
      97.409
      9488.5
  9.0032E+07
  8.1058E+15
@end group
@end example

@item free
@itemx none
Print output in free format, without trying to line up columns of
matrices on the decimal point.  This also causes complex numbers to be
formatted like this @samp{(0.604194, 0.607088)} instead of like this
@samp{0.60419 + 0.60709i}.

@item bank
Print in a fixed format with two places to the right of the decimal
point.

@item +
@itemx + @var{chars}
@itemx plus
@itemx plus @var{chars}
Print a @samp{+} symbol for nonzero matrix elements and a space for zero
matrix elements.  This format can be very useful for examining the
structure of a large matrix.

The optional argument @var{chars} specifies a list of 3 characters to use
for printing values greater than zero, less than zero and equal to zero.
For example, with the @samp{+ "+-."} format, @code{[1, 0, -1; -1, 0, 1]}
is displayed as

@example
@group
ans =

+.-
-.+
@end group
@end example

@itemx native-hex
Print the hexadecimal representation numbers as they are stored in
memory.  For example, on a workstation which stores 8 byte real values
in IEEE format with the least significant byte first, the value of
@code{pi} when printed in @code{hex} format is @code{400921fb54442d18}.
This format only works for numeric values.

@item hex
The same as @code{native-hex}, but always print the most significant
byte first.
@item native-bit
Print the bit representation of numbers as stored in memory.
For example, the value of @code{pi} is

@example
@group
01000000000010010010000111111011
01010100010001000010110100011000
@end group
@end example

(shown here in two 32 bit sections for typesetting purposes) when
printed in bit format on a workstation which stores 8 byte real values
in IEEE format with the least significant byte first.  This format only
works for numeric types.
@item bit
The same as @code{native-bit}, but always print the most significant
bits first.
@item compact
Remove extra blank space around column number labels.
@item loose
Insert blank lines above and below column number labels (this is the
default).
@item rat
Print a rational approximation. That is the values are approximated
by one small integer divided by another.
@end table

By default, Octave will try to print numbers with at least 5 significant
figures within a field that is a maximum of 10 characters wide.

If Octave is unable to format a matrix so that columns line up on the
decimal point and all the numbers fit within the maximum field width,
it switches to an @samp{e} format.

If @code{format} is invoked without any options, the default format
state is restored.
@end deffn
fixed_point_format
-*- texinfo -*-
@deftypefn {Built-in Function} {@var{val} =} fixed_point_format ()
@deftypefnx {Built-in Function} {@var{old_val} =} fixed_point_format (@var{new_val})
Query or set the internal variable that controls whether Octave will
use a scaled format to print matrix values such that the largest
element may be written with a single leading digit with the scaling
factor is printed on the first line of output.  For example,

@example
@group
octave:1> logspace (1, 7, 5)'
ans =

  1.0e+07  *

  0.00000
  0.00003
  0.00100
  0.03162
  1.00000
@end group
@end example

@noindent
Notice that first value appears to be zero when it is actually 1.  For
this reason, you should be careful when setting
@code{fixed_point_format} to a nonzero value.
@end deftypefn
print_empty_dimensions
-*- texinfo -*-
@deftypefn {Built-in Function} {@var{val} =} print_empty_dimensions ()
@deftypefnx {Built-in Function} {@var{old_val} =} print_empty_dimensions (@var{new_val})
Query or set the internal varaible that controls whether the
dimensions of empty matrices are printed along with the empty matrix
symbol, @samp{[]}.  For example, the expression

@example
zeros (3, 0)
@end example

@noindent
will print

@example
ans = [](3x0)
@end example
@end deftypefn
split_long_rows
-*- texinfo -*-
@deftypefn {Built-in Function} {@var{val} =} split_long_rows ()
@deftypefnx {Built-in Function} {@var{old_val} =} split_long_rows (@var{new_val})
Query or set the internal variable that controls whether rows of a matrix
may be split when displayed to a terminal window.  If the rows are split,
Octave will display the matrix in a series of smaller pieces, each of
which can fit within the limits of your terminal width and each set of
rows is labeled so that you can easily see which columns are currently
being displayed.  For example:

@example
@group
octave:13> rand (2,10)
ans =

 Columns 1 through 6:

  0.75883  0.93290  0.40064  0.43818  0.94958  0.16467
  0.75697  0.51942  0.40031  0.61784  0.92309  0.40201

 Columns 7 through 10:

  0.90174  0.11854  0.72313  0.73326
  0.44672  0.94303  0.56564  0.82150
@end group
@end example
@end deftypefn
output_max_field_width
-*- texinfo -*-
@deftypefn {Built-in Function} {@var{val} =} output_max_field_width ()
@deftypefnx {Built-in Function} {@var{old_val} =} output_max_field_width (@var{new_val})
Query or set the internal variable that specifies the maximum width
of a numeric output field.
@seealso{format, output_precision}
@end deftypefn
output_precision
-*- texinfo -*-
@deftypefn {Built-in Function} {@var{val} =} output_precision ()
@deftypefnx {Built-in Function} {@var{old_val} =} output_precision (@var{new_val})
Query or set the internal variable that specifies the minimum number of
significant figures to display for numeric output.
@seealso{format, output_max_field_width}
@end deftypefn
struct_levels_to_print
-*- texinfo -*-
@deftypefn {Built-in Function} {@var{val} =} struct_levels_to_print ()
@deftypefnx {Built-in Function} {@var{old_val} =} struct_levels_to_print (@var{new_val})
Query or set the internal variable that specifies the number of
structure levels to display.
@end deftypefn
__end__
internal function
string_fill_char
-*- texinfo -*-
@deftypefn {Built-in Function} {@var{val} =} string_fill_char ()
@deftypefnx {Built-in Function} {@var{old_val} =} string_fill_char (@var{new_val})
Query or set the internal variable used to pad all rows of a character
matrix to the same length.  It must be a single character.  The default
value is @code{" "} (a single space).  For example,

@example
@group
string_fill_char ("X");
[ "these"; "are"; "strings" ]
     @result{} "theseXX"
        "areXXXX"
        "strings"
@end group
@end example
@end deftypefn
qr
-*- texinfo -*-
@deftypefn {Loadable Function} {[@var{q}, @var{r}, @var{p}] =} qr (@var{a})
@cindex QR factorization
Compute the QR factorization of @var{a}, using standard @sc{Lapack}
subroutines.  For example, given the matrix @code{a = [1, 2; 3, 4]},

@example
[q, r] = qr (a)
@end example

@noindent
returns

@example
q =

  -0.31623  -0.94868
  -0.94868   0.31623

r =

  -3.16228  -4.42719
   0.00000  -0.63246
@end example

The @code{qr} factorization has applications in the solution of least
squares problems
@iftex
@tex
$$
\min_x \left\Vert A x - b \right\Vert_2
$$
@end tex
@end iftex
@ifinfo

@example
@code{min norm(A x - b)}
@end example

@end ifinfo
for overdetermined systems of equations (i.e.,
@iftex
@tex
$A$
@end tex
@end iftex
@ifinfo
@code{a}
@end ifinfo
 is a tall, thin matrix).  The QR factorization is
@iftex
@tex
$QR = A$ where $Q$ is an orthogonal matrix and $R$ is upper triangular.
@end tex
@end iftex
@ifinfo
@code{q * r = a} where @code{q} is an orthogonal matrix and @code{r} is
upper triangular.
@end ifinfo

The permuted QR factorization @code{[@var{q}, @var{r}, @var{p}] =
qr (@var{a})} forms the QR factorization such that the diagonal
entries of @code{r} are decreasing in magnitude order.  For example,
given the matrix @code{a = [1, 2; 3, 4]},

@example
[q, r, p] = qr(a)
@end example

@noindent
returns

@example
q = 

  -0.44721  -0.89443
  -0.89443   0.44721

r =

  -4.47214  -3.13050
   0.00000   0.44721

p =

   0  1
   1  0
@end example

The permuted @code{qr} factorization @code{[q, r, p] = qr (a)}
factorization allows the construction of an orthogonal basis of
@code{span (a)}.
@end deftypefn
quad_options
-*- texinfo -*-
@deftypefn {Loadable Function} {} quad_options (@var{opt}, @var{val})
When called with two arguments, this function
allows you set options parameters for the function @code{quad}.
Given one argument, @code{quad_options} returns the value of the
corresponding option.  If no arguments are supplied, the names of all
the available options and their current values are displayed.

Options include

@table @code
@item "absolute tolerance"
Absolute tolerance; may be zero for pure relative error test.
@item "relative tolerance"
Nonnegative relative tolerance.  If the absolute tolerance is zero,
the relative tolerance must be greater than or equal to 
@code{max (50*eps, 0.5e-28)}.
@end table
@end deftypefn
quad
-*- texinfo -*-
@deftypefn {Loadable Function} {[@var{v}, @var{ier}, @var{nfun}, @var{err}] =} quad (@var{f}, @var{a}, @var{b}, @var{tol}, @var{sing})
Integrate a nonlinear function of one variable using Quadpack.
The first argument is the name of the  function, the function handle or
the inline function to call to compute the value of the integrand.  It
must have the form

@example
y = f (x)
@end example

@noindent
where @var{y} and @var{x} are scalars.

The second and third arguments are limits of integration.  Either or
both may be infinite.

The optional argument @var{tol} is a vector that specifies the desired
accuracy of the result.  The first element of the vector is the desired
absolute tolerance, and the second element is the desired relative
tolerance.  To choose a relative test only, set the absolute
tolerance to zero.  To choose an absolute test only, set the relative
tolerance to zero. 

The optional argument @var{sing} is a vector of values at which the
integrand is known to be singular.

The result of the integration is returned in @var{v} and @var{ier}
contains an integer error code (0 indicates a successful integration).
The value of @var{nfun} indicates how many function evaluations were
required, and @var{err} contains an estimate of the error in the
solution.

You can use the function @code{quad_options} to set optional
parameters for @code{quad}.

It should be noted that since @code{quad} is written in Fortran it
cannot be called recursively.
@end deftypefn
qz
-*- texinfo -*-
@deftypefn {Loadable Function} {@var{lambda} =} qz (@var{a}, @var{b})
Generalized eigenvalue problem @math{A x = s B x},
@var{QZ} decomposition. There are three ways to call this function:
@enumerate
@item @code{lambda = qz(A,B)}

Computes the generalized eigenvalues
@iftex
@tex
$\lambda$
@end tex
@end iftex
@ifinfo
@var{lambda}
@end ifinfo
of @math{(A - s B)}.
@item @code{[AA, BB, Q, Z, V, W, lambda] = qz (A, B)}

Computes qz decomposition, generalized eigenvectors, and 
generalized eigenvalues of @math{(A - sB)}
@iftex
@tex
$$ AV = BV{ \rm diag }(\lambda) $$
$$ W^T A = { \rm diag }(\lambda)W^T B $$
$$ AA = Q^T AZ, BB = Q^T BZ $$
@end tex
@end iftex
@ifinfo
@example
@group

    A*V = B*V*diag(lambda)
    W'*A = diag(lambda)*W'*B
    AA = Q'*A*Z, BB = Q'*B*Z

@end group
@end example
@end ifinfo
with @var{Q} and @var{Z} orthogonal (unitary)= @var{I}

@item @code{[AA,BB,Z@{, lambda@}] = qz(A,B,opt)}

As in form [2], but allows ordering of generalized eigenpairs
for (e.g.) solution of discrete time algebraic Riccati equations.
Form 3 is not available for complex matrices, and does not compute
the generalized eigenvectors @var{V}, @var{W}, nor the orthogonal matrix @var{Q}.
@table @var
@item opt
for ordering eigenvalues of the GEP pencil.  The leading  block
of the revised pencil contains all eigenvalues that satisfy:
@table @code
@item "N"
= unordered (default) 

@item "S"
= small: leading block has all |lambda| <=1 

@item "B"
= big: leading block has all |lambda| >= 1 

@item "-"
= negative real part: leading block has all eigenvalues
in the open left half-plane

@item "+"
= nonnegative real part: leading block has all eigenvalues
in the closed right half-plane
@end  table
@end table
@end enumerate

Note: qz performs permutation balancing, but not scaling (see balance).
Order of output arguments was selected for compatibility with MATLAB

@seealso{balance, dare, eig, schur}
@end deftypefn
rand
-*- texinfo -*-
@deftypefn {Loadable Function} {} rand (@var{x})
@deftypefnx {Loadable Function} {} rand (@var{n}, @var{m})
@deftypefnx {Loadable Function} {} rand ("state", @var{x})
@deftypefnx {Loadable Function} {} rand ("seed", @var{x})
Return a matrix with random elements uniformly distributed on the
interval (0, 1).  The arguments are handled the same as the arguments
for @code{eye}.

You can query the state of the random number generator using the
form

@example
v = rand ("state")
@end example

This returns a column vector @var{v} of length 625. Later, you can
restore the random number generator to the state @var{v}
using the form

@example
rand ("state", v)
@end example

@noindent
You may also initialize the state vector from an arbitrary vector of
length <= 625 for @var{v}.  This new state will be a hash based on the
value of @var{v}, not @var{v} itself.

By default, the generator is initialized from @code{/dev/urandom} if it is
available, otherwise from cpu time, wall clock time and the current
fraction of a second.

@code{rand} uses the Mersenne Twister with a period of 2^19937-1
(See M. Matsumoto and T. Nishimura, ``Mersenne Twister: A 623-dimensionally
equidistributed uniform pseudorandom number generator'', ACM Trans. on
Modeling and Computer Simulation Vol. 8, No. 1, Januray pp.3-30 1998,
@url{http://www.math.keio.ac.jp/~matumoto/emt.html}).
Do @strong{not} use for cryptography without securely hashing
several returned values together, otherwise the generator state
can be learned after reading 624 consecutive values.

@code{rand} includes a second random number generator, that was the
previous generator used in Octave. The new generator is used by default
as it is significantly faster than the old generator, and produces
random numbers with a significantly longer cycle time. However, in
some circumstances it might be desirable to obtain the same random
sequences as used by the old generators. To do this the keyword
"seed" is used to specify that the old generators should be use,
as in

@example
rand ("seed", val)
@end example

which sets the seed of the generator to @var{val}. The seed of the
generator can be queried with

@example
s = rand ("seed")
@end example

However, it should be noted that querying the seed will not cause
@code{rand} to use the old generators, only setting the seed will.
To cause @code{rand} to once again use the new generators, the
keyword "state" should be used to reset the state of the @code{rand}.
@seealso{randn, rande, randg, randp}
@end deftypefn
randn
-*- texinfo -*-
@deftypefn {Loadable Function} {} randn (@var{x})
@deftypefnx {Loadable Function} {} randn (@var{n}, @var{m})
@deftypefnx {Loadable Function} {} randn ("state", @var{x})
@deftypefnx {Loadable Function} {} randn ("seed", @var{x})
Return a matrix with normally distributed random elements. The
arguments are handled the same as the arguments for @code{rand}.

By default, @code{randn} uses a Marsaglia and Tsang Ziggurat technique to
transform from a uniform to a normal distribution. (G. Marsaglia and
W.W. Tsang, 'Ziggurat method for generating random variables',
J. Statistical Software, vol 5, 2000,
@url{http://www.jstatsoft.org/v05/i08/})

@seealso{rand, rande, randg, randp}
@end deftypefn
rande
-*- texinfo -*-
@deftypefn {Loadable Function} {} rande (@var{x})
@deftypefnx {Loadable Function} {} rande (@var{n}, @var{m})
@deftypefnx {Loadable Function} {} rande ("state", @var{x})
@deftypefnx {Loadable Function} {} rande ("seed", @var{x})
Return a matrix with exponentially distributed random elements. The
arguments are handled the same as the arguments for @code{rand}.

By default, @code{randn} uses a Marsaglia and Tsang Ziggurat technique to
transform from a uniform to a exponential distribution. (G. Marsaglia and
W.W. Tsang, 'Ziggurat method for generating random variables',
J. Statistical Software, vol 5, 2000,
@url{http://www.jstatsoft.org/v05/i08/})
@seealso{rand, randn, randg, randp}
@end deftypefn
randg
-*- texinfo -*-
@deftypefn {Loadable Function} {} randg (@var{a}, @var{x})
@deftypefnx {Loadable Function} {} randg (@var{a}, @var{n}, @var{m})
@deftypefnx {Loadable Function} {} randg ("state", @var{x})
@deftypefnx {Loadable Function} {} randg ("seed", @var{x})
Return a matrix with @code{gamma(@var{a},1)} distributed random elements.
The arguments are handled the same as the arguments for @code{rand},
except for the argument @var{a}.

This can be used to generate many distributions:

@table @asis
@item @code{gamma (a, b)} for @code{a > -1}, @code{b > 0}
@example
r = b * randg (a)
@end example
@item @code{beta (a, b)} for @code{a > -1}, @code{b > -1}
@example
r1 = randg (a, 1)
r = r1 / (r1 + randg (b, 1))
@end example
@item @code{Erlang (a, n)}
@example
r = a * randg (n)
@end example
@item @code{chisq (df)} for @code{df > 0}
@example
r = 2 * randg (df / 2)
@end example
@item @code{t(df)} for @code{0 < df < inf} (use randn if df is infinite)
@example
r = randn () / sqrt (2 * randg (df / 2) / df)
@end example
@item @code{F (n1, n2)} for @code{0 < n1}, @code{0 < n2}
@example
r1 = 2 * randg (n1 / 2) / n1 or 1 if n1 is infinite
r2 = 2 * randg (n2 / 2) / n2 or 1 if n2 is infinite
r = r1 / r2

@end example
@item negative @code{binomial (n, p)} for @code{n > 0}, @code{0 < p <= 1}
@example
r = randp ((1 - p) / p * randg (n))
@end example
@item non-central @code{chisq (df, L)}, for @code{df >= 0} and @code{L > 0}
(use chisq if @code{L = 0})
@example
r = randp (L / 2)
r(r > 0) = 2 * randg (r(r > 0))
r(df > 0) += 2 * randg (df(df > 0)/2)
@end example
@item @code{Dirichlet (a1, ..., ak)}
@example
r = (randg (a1), ..., randg (ak))
r = r / sum (r)
@end example
@end table
@seealso{rand, randn, rande, randp}
@end deftypefn
randp
-*- texinfo -*-
@deftypefn {Loadable Function} {} randp (@var{l}, @var{x})
@deftypefnx {Loadable Function} {} randp (@var{l}, @var{n}, @var{m})
@deftypefnx {Loadable Function} {} randp ("state", @var{x})
@deftypefnx {Loadable Function} {} randp ("seed", @var{x})
Return a matrix with Poisson distributed random elements. The arguments
are handled the same as the arguments for @code{rand}, except for the
argument @var{l}.

Five different algorithms are used depending on the range of @var{l}
and whether or not @var{l} is a scalar or a matrix.

@table @asis
@item For scalar @var{l} <= 12, use direct method.
Press, et al., 'Numerical Recipes in C', Cambridge University Press, 1992.
@item For scalar @var{l} > 12, use rejection method.[1]
Press, et al., 'Numerical Recipes in C', Cambridge University Press, 1992.
@item For matrix @var{l} <= 10, use inversion method.[2]
Stadlober E., et al., WinRand source code, available via FTP.
@item For matrix @var{l} > 10, use patchwork rejection method.
Stadlober E., et al., WinRand source code, available via FTP, or
H. Zechner, 'Efficient sampling from continuous and discrete
unimodal distributions', Doctoral Dissertaion, 156pp., Technical
University Graz, Austria, 1994.
@item For @var{l} > 1e8, use normal approximation.
L. Montanet, et al., 'Review of Particle Properties', Physical Review
D 50 p1284, 1994
@end table
@seealso{rand, randn, rande, randg}
@end deftypefn
regexp
-*- texinfo -*-
@deftypefn {Loadable Function} {[@var{s}, @var{e}, @var{te}, @var{m}, @var{t}, @var{nm}] =} regexp (@var{str}, @var{pat})
@deftypefnx {Loadable Function} {[@dots{}] =} regexp (@var{str}, @var{pat}, @var{opts}, @dots{})

Regular expression string matching. Matches @var{pat} in @var{str} and
returns the position and matching substrings or empty values if there are
none.

The matched pattern @var{pat} can include any of the standard regex
operators, including:

@table @code
@item .
Match any character
@item * + ? @{@}
Repetition operators, representing
@table @code
@item *
Match zero or more times
@item +
Match one or more times
@item ?
Match zero or one times
@item @{@}
Match range operator, which is of the form @code{@{@var{n}@}} to match exactly
@var{n} times, @code{@{@var{m},@}} to match @var{m} or more times,
@code{@{@var{m},@var{n}@}} to match between @var{m} and @var{n} times.
@end table
@item [@dots{}] [^@dots{}]
List operators, where for example @code{[ab]c} matches @code{ac} and @code{bc}
@item ()
Grouping operator
@item |
Alternation operator. Match one of a choice of regular expressions. The
alternatives must be delimited by the grouoing operator @code{()} above
@item ^ $
Anchoring operator. @code{^} matches the start of the string @var{str} and
@code{$} the end
@end table

In addition the following escaped characters have special meaning. It should
be noted that it is recommended to quote @var{pat} in single quotes rather
than double quotes, to avoid the escape sequences being interpreted by octave
before being passed to @code{regexp}.

@table @code
@item \b
Match a word boundary
@item \B
Match within a word
@item \w
Matches any word character
@item \W
Matches any non word character
@item \<
Matches the beginning of a word
@item \>
Matches the end of a word
@item \s
Matches any whitespace character
@item \S
Matches any non whitespace character
@item \d
Matches any digit
@item \D
Matches any non-digit
@end table

The outputs of @code{regexp} by default are in the order as given below

@table @asis
@item @var{s}
The start indices of each of the matching substrings

@item @var{e}
The end indices of each matching substring

@item @var{te}
The extents of each of the matched token surrounded by @code{(@dots{})} in
@var{pat}.

@item @var{m}
A cell array of the text of each match.

@item @var{t}
A cell array of the text of each token matched.

@item @var{nm}
A structure containing the text of each matched named token, with the name
being used as the fieldname. A named token is denoted as
@code{(?<name>@dots{})}
@end table

Particular output arguments or the order of the output arguments can be
selected by additional @var{opts} arguments. These are strings and the
correspondence between the output arguments and the optional argument
are

@multitable @columnfractions 0.2 0.3 0.3 0.2
@item @tab 'start'        @tab @var{s}  @tab
@item @tab 'end'          @tab @var{e}  @tab
@item @tab 'tokenExtents' @tab @var{te} @tab
@item @tab 'match'        @tab @var{m}  @tab
@item @tab 'tokens'       @tab @var{t}  @tab
@item @tab 'names'        @tab @var{nm}  @tab
@end multitable

A further optional argument is 'once', that limits the number of returned
matches to the first match. Additional arguments are

@table @asis
@item matchcase
Make the matching case sensitive.
@item ignorecase
Make the matching case insensitive.
@item stringanchors
Match the anchor characters at the beginning and end of the string.
@item lineanchors
Match the anchor characters at the beginning and end of the line.
@item dotall
The character @code{.} matches the newline character.
@item dotexceptnewline
The character @code{.} matches all but the newline character.
@item freespacing
The pattern can include arbitrary whitespace and comments starting with
@code{#}.
@item literalspacing
The pattern is taken literally.
@end table
@end deftypefn
regexpi
-*- texinfo -*-
@deftypefn {Loadable Function} {[@var{s}, @var{e}, @var{te}, @var{m}, @var{t}, @var{nm}] =} regexpi (@var{str}, @var{pat})
@deftypefnx {Loadable Function} {[@dots{}] =} regexpi (@var{str}, @var{pat}, @var{opts}, @dots{})

Case insensitive regular expression string matching. Matches @var{pat} in
@var{str} and returns the position and matching substrings or empty values
if there are none. See @code{regexp} for more details
@end deftypefn
regexprep
-*- texinfo -*-
@deftypefn {Loadable Function}  {@var{string} =} regexprep (@var{string}, @var{pat}, @var{repstr}, @var{options})
Replace matches of @var{pat} in  @var{string} with @var{repstr}.


The replacement can contain @code{$i}, which subsubstitutes
for the ith set of parentheses in the match string.  E.g.,
@example

   regexprep("Bill Dunn",'(\w+) (\w+)','$2, $1')

@end example
returns "Dunn, Bill"

@var{options} may be zero or more of
@table @samp

@item once
Replace only the first occurance of @var{pat} in the result.

@item warnings
This option is present for compatibility but is ignored.

@item ignorecase or matchcase
Ignore case for the pattern matching (see @code{regexpi}).
Alternatively, use (?i) or (?-i) in the pattern.

@item lineanchors and stringanchors
Whether characters ^ and $ match the beginning and ending of lines.
Alternatively, use (?m) or (?-m) in the pattern.

@item dotexceptnewline and dotall
Whether . matches newlines in the string.
Alternatively, use (?s) or (?-s) in the pattern.

@item freespacing or literalspacing
Whether whitespace and # comments can be used to make the regular expression more readable.
Alternatively, use (?x) or (?-x) in the pattern.

@end table
@seealso{regexp,regexpi}
@end deftypefn
schur
-*- texinfo -*-
@deftypefn {Loadable Function} {@var{s} =} schur (@var{a})
@deftypefnx {Loadable Function} {[@var{u}, @var{s}] =} schur (@var{a}, @var{opt})
@cindex Schur decomposition
The Schur decomposition is used to compute eigenvalues of a
square matrix, and has applications in the solution of algebraic
Riccati equations in control (see @code{are} and @code{dare}).
@code{schur} always returns
@iftex
@tex
$S = U^T A U$
@end tex
@end iftex
@ifinfo
@code{s = u' * a * u}
@end ifinfo
where
@iftex
@tex
$U$
@end tex
@end iftex
@ifinfo
@code{u}
@end ifinfo
 is a unitary matrix
@iftex
@tex
($U^T U$ is identity)
@end tex
@end iftex
@ifinfo
(@code{u'* u} is identity)
@end ifinfo
and
@iftex
@tex
$S$
@end tex
@end iftex
@ifinfo
@code{s}
@end ifinfo
is upper triangular.  The eigenvalues of
@iftex
@tex
$A$ (and $S$)
@end tex
@end iftex
@ifinfo
@code{a} (and @code{s})
@end ifinfo
are the diagonal elements of
@iftex
@tex
$S$.
@end tex
@end iftex
@ifinfo
@code{s}.
@end ifinfo
If the matrix
@iftex
@tex
$A$
@end tex
@end iftex
@ifinfo
@code{a}
@end ifinfo
is real, then the real Schur decomposition is computed, in which the
matrix
@iftex
@tex
$U$
@end tex
@end iftex
@ifinfo
@code{u}
@end ifinfo
is orthogonal and
@iftex
@tex
$S$
@end tex
@end iftex
@ifinfo
@code{s}
@end ifinfo
is block upper triangular
with blocks of size at most
@iftex
@tex
$2\times 2$
@end tex
@end iftex
@ifinfo
@code{2 x 2}
@end ifinfo
along the diagonal.  The diagonal elements of
@iftex
@tex
$S$
@end tex
@end iftex
@ifinfo
@code{s}
@end ifinfo
(or the eigenvalues of the
@iftex
@tex
$2\times 2$
@end tex
@end iftex
@ifinfo
@code{2 x 2}
@end ifinfo
blocks, when
appropriate) are the eigenvalues of
@iftex
@tex
$A$
@end tex
@end iftex
@ifinfo
@code{a}
@end ifinfo
and
@iftex
@tex
$S$.
@end tex
@end iftex
@ifinfo
@code{s}.
@end ifinfo

The eigenvalues are optionally ordered along the diagonal according to
the value of @code{opt}.  @code{opt = "a"} indicates that all
eigenvalues with negative real parts should be moved to the leading
block of
@iftex
@tex
$S$
@end tex
@end iftex
@ifinfo
@code{s}
@end ifinfo
(used in @code{are}), @code{opt = "d"} indicates that all eigenvalues
with magnitude less than one should be moved to the leading block of
@iftex
@tex
$S$
@end tex
@end iftex
@ifinfo
@code{s}
@end ifinfo
(used in @code{dare}), and @code{opt = "u"}, the default, indicates that
no ordering of eigenvalues should occur.  The leading
@iftex
@tex
$k$
@end tex
@end iftex
@ifinfo
@code{k}
@end ifinfo
columns of
@iftex
@tex
$U$
@end tex
@end iftex
@ifinfo
@code{u}
@end ifinfo
always span the
@iftex
@tex
$A$-invariant
@end tex
@end iftex
@ifinfo
@code{a}-invariant
@end ifinfo
subspace corresponding to the
@iftex
@tex
$k$
@end tex
@end iftex
@ifinfo
@code{k}
@end ifinfo
leading eigenvalues of
@iftex
@tex
$S$.
@end tex
@end iftex
@ifinfo
@code{s}.
@end ifinfo
@end deftypefn
SIG
-*- texinfo -*-
@deftypefn {Built-in Function} {} SIG ()
Return a structure containing Unix signal names and their defined values.
@end deftypefn
debug_on_interrupt
-*- texinfo -*-
@deftypefn {Built-in Function} {@var{val} =} debug_on_interrupt ()
@deftypefnx {Built-in Function} {@var{old_val} =} debug_on_interrupt (@var{new_val})
Query or set the internal variable that controls whether Octave will try
to enter debugging mode when it receives an interrupt signal (typically
generated with @kbd{C-c}).  If a second interrupt signal is received
before reaching the debugging mode, a normal interrupt will occur.
@end deftypefn
sighup_dumps_octave_core
-*- texinfo -*-
@deftypefn {Built-in Function} {@var{val} =} sighup_dumps_octave_core ()
@deftypefnx {Built-in Function} {@var{old_val} =} sighup_dumps_octave_core (@var{new_val})
Query or set the internal variable that controls whether Octave tries
to save all current variables to the file "octave-core" if it receives
a hangup signal.
@end deftypefn
sigterm_dumps_octave_core
-*- texinfo -*-
@deftypefn {Built-in Function} {@var{val} =} sigterm_dumps_octave_core ()
@deftypefnx {Built-in Function} {@var{old_val} =} sigterm_dumps_octave_core (@var{new_val})
Query or set the internal variable that controls whether Octave tries
to save all current variables to the file "octave-core" if it receives
a terminate signal.
@end deftypefn
sort
-*- texinfo -*-
@deftypefn {Loadable Function} {[@var{s}, @var{i}] =} sort (@var{x})
@deftypefnx {Loadable Function} {[@var{s}, @var{i}] =} sort (@var{x}, @var{dim})
@deftypefnx {Loadable Function} {[@var{s}, @var{i}] =} sort (@var{x}, @var{mode})
@deftypefnx {Loadable Function} {[@var{s}, @var{i}] =} sort (@var{x}, @var{dim}, @var{mode})
Return a copy of @var{x} with the elements arranged in increasing
order.  For matrices, @code{sort} orders the elements in each column.

For example,

@example
@group
sort ([1, 2; 2, 3; 3, 1])
     @result{}  1  1
         2  2
         3  3
@end group
@end example

The @code{sort} function may also be used to produce a matrix
containing the original row indices of the elements in the sorted
matrix.  For example,

@example
@group
[s, i] = sort ([1, 2; 2, 3; 3, 1])
     @result{} s = 1  1
            2  2
            3  3
     @result{} i = 1  3
            2  1
            3  2
@end group
@end example

If the optional argument @var{dim} is given, then the matrix is sorted
along the dimension defined by @var{dim}. The optional argument @code{mode}
defines the order in which the values will be sorted. Valid values of
@code{mode} are `ascend' or `descend'.

For equal elements, the indices are such that the equal elements are listed
in the order that appeared in the original list.

The @code{sort} function may also be used to sort strings and cell arrays
of strings, in which case the dictionary order of the strings is used.

The algorithm used in @code{sort} is optimized for the sorting of partially
ordered lists.
@end deftypefn
issparse
-*- texinfo -*-
@deftypefn {Loadable Function} {} issparse (@var{expr})
Return 1 if the value of the expression @var{expr} is a sparse matrix.
@end deftypefn
sparse
-*- texinfo -*-
@deftypefn {Loadable Function} {@var{s} =} sparse (@var{a})
Create a sparse matrix from the full matrix @var{a}.
is forced back to a full matrix is resulting matrix is sparse

@deftypefnx {Loadable Function} {@var{s} =} sparse (@var{a}, 1)
Create a sparse matrix and convert it back to a full matrix.
is forced back to a full matrix is resulting matrix is sparse

@deftypefnx {Loadable Function} {@var{s} =} sparse (@var{i}, @var{j}, @var{sv}, @var{m}, @var{n}, @var{nzmax})
Create a sparse matrix given integer index vectors @var{i} and @var{j},
a 1-by-@code{nnz} vector of real of complex values @var{sv}, overall
dimensions @var{m} and @var{n} of the sparse matrix.  The argument
@code{nzmax} is ignored but accepted for compatability with @sc{Matlab}.

@strong{Note}: if multiple values are specified with the same
@var{i}, @var{j} indices, the corresponding values in @var{s} will
be added.

The following are all equivalent:

@example
@group
s = sparse (i, j, s, m, n)
s = sparse (i, j, s, m, n, "summation")
s = sparse (i, j, s, m, n, "sum")
@end group
@end example

@deftypefnx {Loadable Function} {@var{s} =} sparse (@var{i}, @var{j}, @var{s}, @var{m}, @var{n}, "unique")
Same as above, except that if more than two values are specified for the
same @var{i}, @var{j} indices, the last specified value will be used.

@deftypefnx {Loadable Function} {@var{s} =} sparse (@var{i}, @var{j}, @var{sv})
Uses @code{@var{m} = max (@var{i})}, @code{@var{n} = max (@var{j})}

@deftypefnx {Loadable Function} {@var{s} =} sparse (@var{m}, @var{n})
Equivalent to @code{sparse ([], [], [], @var{m}, @var{n}, 0)}

If any of @var{sv}, @var{i} or @var{j} are scalars, they are expanded
to have a common size.
@seealso{full}
@end deftypefn
full
-*- texinfo -*-
@deftypefn {Loadable Function} {@var{FM} =} full (@var{SM})
 returns a full storage matrix from a sparse one
@seealso{sparse}
@end deftypefn
spprod
-*- texinfo -*-
@deftypefn {Loadable Function} {@var{y} =} spprod (@var{x},@var{dim})
Product of elements along dimension @var{dim}.  If @var{dim} is omitted,
it defaults to 1 (column-wise products).
@seealso{spsum, spsumsq}
@end deftypefn
spcumprod
-*- texinfo -*-
@deftypefn {Loadable Function} {@var{y} =} spcumprod (@var{x},@var{dim})
Cumulative product of elements along dimension @var{dim}.  If @var{dim}
is omitted, it defaults to 1 (column-wise cumulative products).
@seealso{spcumsum}
@end deftypefn
spsum
-*- texinfo -*-
@deftypefn {Loadable Function} {@var{y} =} spsum (@var{x},@var{dim})
Sum of elements along dimension @var{dim}.  If @var{dim} is omitted, it
defaults to 1 (column-wise sum).
@seealso{spprod, spsumsq}
@end deftypefn
spcumsum
-*- texinfo -*-
@deftypefn {Loadable Function} {@var{y} =} spcumsum (@var{x},@var{dim})
Cumulative sum of elements along dimension @var{dim}.  If @var{dim}
is omitted, it defaults to 1 (column-wise cumulative sums).
@seealso{spcumprod}
@end deftypefn
spsumsq
-*- texinfo -*-
@deftypefn {Loadable Function} {@var{y} =} spsumsq (@var{x},@var{dim})
Sum of squares of elements along dimension @var{dim}.  If @var{dim}
is omitted, it defaults to 1 (column-wise sum of squares).
This function is equivalent to computing
@example
spsum (x .* spconj (x), dim)
@end example
but it uses less memory and avoids calling @code{spconj} if @var{x} is
real.
@seealso{spprod, spsum}
@end deftypefn
spmin
-*- texinfo -*-
@deftypefn {Mapping Function} {} spmin (@var{x}, @var{y}, @var{dim})
@deftypefnx {Mapping Function} {[@var{w}, @var{iw}] =} spmin (@var{x})
@cindex Utility Functions
For a vector argument, return the minimum value.  For a matrix
argument, return the minimum value from each column, as a row
vector, or over the dimension @var{dim} if defined. For two matrices
(or a matrix and scalar), return the pair-wise minimum.
Thus,

@example
min (min (@var{x}))
@end example

@noindent
returns the smallest element of @var{x}, and

@example
@group
min (2:5, pi)
    @result{}  2.0000  3.0000  3.1416  3.1416
@end group
@end example
@noindent
compares each element of the range @code{2:5} with @code{pi}, and
returns a row vector of the minimum values.

For complex arguments, the magnitude of the elements are used for
comparison.

If called with one input and two output arguments,
@code{min} also returns the first index of the
minimum value(s). Thus,

@example
@group
[x, ix] = min ([1, 3, 0, 2, 5])
    @result{}  x = 0
        ix = 3
@end group
@end example
@end deftypefn
spmax
-*- texinfo -*-
@deftypefn {Mapping Function} {} spmax (@var{x}, @var{y}, @var{dim})
@deftypefnx {Mapping Function} {[@var{w}, @var{iw}] =} spmax (@var{x})
@cindex Utility Functions
For a vector argument, return the maximum value.  For a matrix
argument, return the maximum value from each column, as a row
vector, or over the dimension @var{dim} if defined. For two matrices
(or a matrix and scalar), return the pair-wise maximum.
Thus,

@example
max (max (@var{x}))
@end example

@noindent
returns the largest element of @var{x}, and

@example
@group
max (2:5, pi)
    @result{}  3.1416  3.1416  4.0000  5.0000
@end group
@end example
@noindent
compares each element of the range @code{2:5} with @code{pi}, and
returns a row vector of the maximum values.

For complex arguments, the magnitude of the elements are used for
comparison.

If called with one input and two output arguments,
@code{max} also returns the first index of the
maximum value(s). Thus,

@example
@group
[x, ix] = max ([1, 3, 5, 2, 5])
    @result{}  x = 5
        ix = 3
@end group
@end example
@end deftypefn
spatan2
-*- texinfo -*-
@deftypefn {Loadable Function} {} spatan2 (@var{y}, @var{x})
Compute atan (Y / X) for corresponding sparse matrix elements of Y and X.
The result is in range -pi to pi.
@end deftypefn
spdiag
-*- texinfo -*-
@deftypefn {Loadable Function} {} spdiag (@var{v}, @var{k})
Return a diagonal matrix with the sparse vector @var{v} on diagonal
@var{k}. The second argument is optional. If it is positive, the vector is
placed on the @var{k}-th super-diagonal. If it is negative, it is placed
on the @var{-k}-th sub-diagonal.  The default value of @var{k} is 0, and
the vector is placed on the main diagonal.  For example,

@example
@group
spdiag ([1, 2, 3], 1)
ans =

Compressed Column Sparse (rows=4, cols=4, nnz=3)
  (1 , 2) -> 1
  (2 , 3) -> 2
  (3 , 4) -> 3
@end group
@end example

@noindent
Given a matrix argument, instead of a vector, @code{spdiag} extracts the
@var{k}-th diagonal of the sparse matrix.
@seealso{diag}
@end deftypefn
spchol
-*- texinfo -*-
@deftypefn {Loadable Function} {@var{r} =} spchol (@var{a})
@deftypefnx {Loadable Function} {[@var{r}, @var{p}] =} spchol (@var{a})
@deftypefnx {Loadable Function} {[@var{r}, @var{p}, @var{q}] =} spchol (@var{a})
@cindex Cholesky factorization
Compute the Cholesky factor, @var{r}, of the symmetric positive definite
sparse matrix @var{a}, where
@iftex
@tex
$ R^T R = A $.
@end tex
@end iftex
@ifinfo

@example
r' * r = a.
@end example
@end ifinfo

If called with 2 or more outputs @var{p} is the 0 when @var{r} is positive
definite and @var{p} is a positive integer otherwise.

If called with 3 outputs then a sparsity preserving row/column permutation
is applied to @var{a} prior to the factorization. That is @var{r}
is the factorization of @code{@var{a}(@var{q},@var{q})} such that
@iftex
@tex
$ R^T R = Q A Q^T$.
@end tex
@end iftex
@ifinfo

@example
r' * r = q * a * q'.
@end example
@end ifinfo

Note that @code{splchol} factorizations is faster and use less memory.
@seealso{spcholinv, spchol2inv, splchol}
@end deftypefn
splchol
-*- texinfo -*-
@deftypefn {Loadable Function} {@var{l} =} splchol (@var{a})
@deftypefnx {Loadable Function} {[@var{l}, @var{p}] =} splchol (@var{a})
@deftypefnx {Loadable Function} {[@var{l}, @var{p}, @var{q}] =} splchol (@var{a})
@cindex Cholesky factorization
Compute the Cholesky factor, @var{l}, of the symmetric positive definite
sparse matrix @var{a}, where
@iftex
@tex
$ L L^T = A $.
@end tex
@end iftex
@ifinfo

@example
l * l' = a.
@end example
@end ifinfo

If called with 2 or more outputs @var{p} is the 0 when @var{l} is positive
definite and @var{l} is a positive integer otherwise.

If called with 3 outputs that a sparsity preserving row/column permutation
is applied to @var{a} prior to the factorization. That is @var{l}
is the factorization of @code{@var{a}(@var{q},@var{q})} such that
@iftex
@tex
$ L R^T = A (Q, Q)$.
@end tex
@end iftex
@ifinfo

@example
r * r' = a (q, q).
@end example
@end ifinfo

Note that @code{splchol} factorizations is faster and use less memory
than @code{spchol}. @code{splchol(@var{a})} is equivalent to
@code{spchol(@var{a})'}.
@seealso{spcholinv, spchol2inv, splchol}
@end deftypefn
spcholinv
-*- texinfo -*-
@deftypefn {Loadable Function} {} spcholinv (@var{a})
Use the Cholesky factorization to compute the inverse of the
sparse symmetric positive definite matrix @var{a}.
@seealso{spchol, spchol2inv}
@end deftypefn
spchol2inv
-*- texinfo -*-
@deftypefn {Loadable Function} {} spchol2inv (@var{u})
Invert a sparse symmetric, positive definite square matrix from its
Cholesky decomposition, @var{u}.  Note that @var{u} should be an
upper-triangular matrix with positive diagonal elements.
@code{chol2inv (@var{u})} provides @code{inv (@var{u}'*@var{u})} but
it is much faster than using @code{inv}.
@seealso{spchol, spcholinv}
@end deftypefn
symbfact
-*- texinfo -*-
@deftypefn {Loadable Function} {[@var{count}, @var{h}, @var{parent}, @var{post}, @var{r}] =} symbfact (@var{s}, @var{typ}, @var{mode})

Performs a symbolic factorization analysis on the sparse matrix @var{s}.
Where

@table @asis
@item @var{s}
@var{s} is a complex or real sparse matrix.

@item @var{typ}
Is the type of the factorization and can be one of

@table @code
@item sym
Factorize @var{s}. This is the default.

@item col
Factorize @code{@var{s}' * @var{s}}.
@item row
Factorize @code{@var{s} * @var{s}'}.
@item lo
Factorize @code{@var{s}'}
@end table

@item @var{mode}
The default is to return the Cholesky factorization for @var{r}, and if
@var{mode} is 'L', the conjugate transpose of the Choleksy factorization
is returned. The conjugate transpose version is faster and uses less
memory, but returns the same values for @var{count}, @var{h}, @var{parent}
and @var{post} outputs.
@end table

The output variables are

@table @asis
@item @var{count}
The row counts of the Cholesky factorization as determined by @var{typ}.

@item @var{h}
The height of the elimination tree.

@item @var{parent}
The elimination tree itself.

@item @var{post}
A sparse boolean matrix whose structure is that of the Cholesky
factorization as determined by @var{typ}.
@end table
@end deftypefn
spdet
-*- texinfo -*-
@deftypefn {Loadable Function} {[@var{d}, @var{rcond}] = } spdet (@var{a})
Compute the determinant of sparse matrix @var{a} using UMFPACK.  Return
an estimate of the reciprocal condition number if requested.
@end deftypefn
spfind
-*- texinfo -*-
@deftypefn {Loadable Function} {} spfind (@var{x})
@deftypefnx {Loadable Function} {} spfind (@var{x}, @var{n})
@deftypefnx {Loadable Function} {} spfind (@var{x}, @var{n}, @var{direction})
@deftypefnx {Loadable Function} {[@var{i}, @var{j}, @var{v}} spfind (@dots{})

A sparse version of the @code{find} function. Please see the @code{find}
for details of its use.

Note that this function is particularly useful for sparse matrices, as
it extracts the non-zero elements as vectors, which can then be used to
create the original matrix. For example,

@example
@group
sz = size(a);
[i, j, v] = spfind (a);
b = sparse(i, j, v, sz(1), sz(2));
@end group
@end example
@seealso{sparse}
@end deftypefn
spkron
-*- texinfo -*-
@deftypefn {Loadable Function} {} spkron (@var{a}, @var{b})
Form the kronecker product of two sparse matrices. This is defined
block by block as

@example
x = [a(i, j) b]
@end example

For example,

@example
@group
kron(speye(3),spdiag([1,2,3]))
@result{}
Compressed Column Sparse (rows = 9, cols = 9, nnz = 9)

  (1, 1) ->  1
  (2, 2) ->  2
  (3, 3) ->  3
  (4, 4) ->  1
  (5, 5) ->  2
  (6, 6) ->  3
  (7, 7) ->  1
  (8, 8) ->  2
  (9, 9) ->  3
@end group
@end example
@end deftypefn
splu
-*- texinfo -*-
@deftypefn {Loadable Function} {[@var{l}, @var{u}] =} splu (@var{a})
@deftypefnx {Loadable Function} {[@var{l}, @var{u}, @var{P}] =} splu (@var{a})
@deftypefnx {Loadable Function} {[@var{l}, @var{u}, @var{P}, @var{Q}] =} splu (@var{a})
@deftypefnx {Loadable Function} {[@var{l}, @var{u}, @var{P}, @var{Q}] =} splu (@dots{}, @var{thres})
@deftypefnx {Loadable Function} {[@var{l}, @var{u}, @var{P}] =} splu (@dots{}, @var{Q})
@cindex LU decomposition
Compute the LU decomposition of the sparse matrix @var{a}, using
subroutines from UMFPACK.  The result is returned in a permuted
form, according to the optional return values @var{P} and @var{Q}.

Called with two or three output arguments and a single input argument,
@dfn{splu} is a replacement for @dfn{lu}, and therefore the sparsity
preserving column permutations @var{Q} are not performed. Called with
a fourth output argument, the sparsity preserving column transformation
@var{Q} is returned, such that @code{@var{P} * @var{a} * @var{Q} =
@var{l} * @var{u}}.

An additional input argument @var{thres}, that defines the pivoting
threshold can be given. Alternatively, the desired sparsity preserving
column permutations @var{Q} can be passed. Note that @var{Q} is assumed
to be fixed if three are fewer than four output arguments. Otherwise,
the updated column permutations are returned as the fourth argument.

With two output arguments, returns the permuted forms of the upper and
lower triangular matrices, such that @code{@var{a} = @var{l} * @var{u}}.
With two or three output arguments, if a user-defined @var{Q} is given,
then @code{@var{u} * @var{Q}'} is returned. The matrix is not required to
be square.
@seealso{sparse, spinv, colamd, symamd}
@end deftypefn
spinv
-*- texinfo -*-
@deftypefn {Loadable Function} {[@var{x}, @var{rcond}] = } spinv (@var{a}, @var{Q})
Compute the inverse of the sparse square matrix @var{a}.  Return an estimate
of the reciprocal condition number if requested, otherwise warn of an
ill-conditioned matrix if the reciprocal condition number is small.
This function takes advantage of the sparsity of the matrix to accelerate
the calculation of the inverse.

In general @var{x} will be a full matrix, and so if possible forming the
inverse of a sparse matrix should be avoided. It is significantly more
accurate and faster to do @code{@var{y} = @var{a} \ @var{b}}, rather
than @code{@var{y} = spinv (@var{a}) * @var{b}}.
@end deftypefn
spparms
-*- texinfo -*-
@deftypefn {Loadable Function} { } spparms ()
@deftypefnx {Loadable Function} {@var{vals} =} spparms ()
@deftypefnx {Loadable Function} {[@var{keys}, @var{vals}] =} spparms ()
@deftypefnx {Loadable Function} {@var{val} =} spparms (@var{key})
@deftypefnx {Loadable Function} { } spparms (@var{vals})
@deftypefnx {Loadable Function} { } spparms ('defaults')
@deftypefnx {Loadable Function} { } spparms ('tight')
@deftypefnx {Loadable Function} { } spparms (@var{key}, @var{val})
Sets or displays the parameters used by the sparse solvers and factorization
functions. The first four calls above get information about the current
settings, while the others change the current settings. The parameters are
stored as pairs of keys and values, where the values are all floats and the
keys are one of the strings

@itemize
@item spumoni
Printing level of debugging information of the solvers (default 0)
@item ths_rel
Included for compatiability. Bot used. (default 1)
@item ths_abs
Included for compatiability. Bot used. (default 1)
@item exact_d
Included for compatiability. Bot used. (default 0)
@item supernd
Included for compatiability. Not used. (default 3)
@item rreduce
Included for compatiability. Not used. (default 3)
@item wh_frac
Inluded for compatiability. Not used. (default 0.5)
@item autommd
Flag whether the LU/QR and the '\' and '/' operators will automatically
use the sparsity preserving mmd functions (default 1)
@item autoamd
Flag whether the LU and the '\' and '/' operators will automatically
use the sparsity preserving amd functions (default 1)
@item piv_tol
The pivot tolerance of the UMFPACK solvers (default 0.1)
@item bandden
?? (default 0.5)
@item umfpack
Flag whether the UMFPACK or mmd solvers are used for the LU, '\' and
'/' operations (default 1)
@end itemize

The value of individual keys can be set with @code{spparms (@var{key},
@var{val})}. The default values can be restored with the special keyword
'defaults'. The special keyword 'tight' can be used to set the mmd solvers
to attempt for a sparser solution at the potetial cost of longer running
time.
@end deftypefn
spqr
-*- texinfo -*-
@deftypefn {Loadable Function} {@var{r} =} spqr (@var{a})
@deftypefnx {Loadable Function} {@var{r} =} spqr (@var{a},0)
@deftypefnx {Loadable Function} {[@var{c}, @var{r}] =} spqr (@var{a},@var{b})
@deftypefnx {Loadable Function} {[@var{c}, @var{r}] =} spqr (@var{a},@var{b},0)
@cindex QR factorization
Compute the sparse QR factorization of @var{a}, using @sc{CSparse}.
As the matrix @var{Q} is in general a full matrix, this function returns
the @var{Q}-less factorization @var{r} of @var{a}, such that
@code{@var{r} = chol (@var{a}' * @var{a})}.

If the final argument is the scalar @code{0} and the number of rows is
larger than the number of columns, then an economy factorization is
returned. That is @var{r} will have only @code{size (@var{a},1)} rows.

If an additional matrix @var{b} is supplied, then @code{spqr} returns
@var{c}, where @code{@var{c} = @var{q}' * @var{b}}. This allows the
least squares approximation of @code{@var{a} \ @var{b}} to be calculated
as

@example
[@var{c},@var{r}] = spqr (@var{a},@var{b})
@var{x} = @var{r} \ @var{c}
@end example
@seealso{spchol, qr}
@end deftypefn
dmperm
-*- texinfo -*-
@deftypefn {Loadable Function} {@var{p} =} dmperm (@var{s})
@deftypefnx {Loadable Function} {[@var{p}, @var{q}, @var{r}, @var{s}] =} dmperm (@var{s})

@cindex Dulmage-Mendelsohn decomposition
Perform a Dulmage-Mendelsohn permutation on the sparse matrix @var{s}.
With a single output argument @dfn{dmperm} performs the row permutations
@var{p} such that @code{@var{s} (@var{p},:)} has no zero elements on the
diagonal.

Called with two or more output arguments, returns the row and column
permutations, such that @code{@var{s} (@var{p}, @var{q})} is in block
triangular form. The values of @var{r} and @var{s} define the boundaries
of the blocks. If @var{s} is square then @code{@var{r} == @var{s}}.

The method used is described in: A. Pothen & C.-J. Fan. Computing the block
triangular form of a sparse matrix. ACM Trans. Math. Software,
16(4):303-324, 1990.
@seealso{colamd, ccolamd}
@end deftypefn
sprank
-*- texinfo -*-
@deftypefn {Loadable Function} {@var{p} =} sprank (@var{s})

@cindex Structural Rank
Calculates the structural rank of a sparse matrix @var{s}. Note that
only the structure of the matrix is used in this calculation based on
a Dulmage-Mendelsohn to block triangular form. As such the numerical
rank of the matrix @var{s} is bounded by @code{sprank (@var{s}) >=
rank (@var{s})}. Ignoring floating point errors @code{sprank (@var{s}) ==
rank (@var{s})}.
@seealso{dmperm}
@end deftypefn
sqrtm
-*- texinfo -*-
@deftypefn {Loadable Function} {[@var{result}, @var{error_estimate}] =} sqrtm (@var{a})
Compute the matrix square root of the square matrix @var{a}.

Ref: Nicholas J. Higham. A new sqrtm for MATLAB. Numerical Analysis
Report No. 336, Manchester Centre for Computational Mathematics,
Manchester, England, January 1999.
@seealso{expm, logm, funm}
@end deftypefn
char
-*- texinfo -*-
@deftypefn {Built-in Function} {} char (@var{x})
@deftypefnx {Built-in Function} {} char (@var{cell_array})
@deftypefnx {Built-in Function} {} char (@var{s1}, @var{s2}, @dots{})
Create a string array from a numeric matrix, cell array, or list of

If the argument is a numeric matrix, each element of the matrix is
converted to the corresponding ASCII character.  For example,

@example
@group
char ([97, 98, 99])
     @result{} "abc"
@end group
@end example

If the argument is a cell array of strings, the result is a string array
with each element corresponding to one element of the cell array.

For multiple string arguments, the result is a string array with each
element corresponding to the arguments.

The returned values are padded with blanks as needed to make each row
of the string array have the same length.
@end deftypefn
ischar
-*- texinfo -*-
@deftypefn {Built-in Function} {} ischar (@var{a})
Return 1 if @var{a} is a string.  Otherwise, return 0.
@end deftypefn
strcmp
-*- texinfo -*-
@deftypefn {Built-in Function} {} strcmp (@var{s1}, @var{s2})
Return 1 if the character strings @var{s1} and @var{s2} are the same,
and 0 otherwise.

If either @var{s1} or @var{s2} is a cell array of strings, then an array
of the same size is returned, containing the values described above for
every member of the cell array. The other argument may also be a cell
array of strings (of the same size or with only one element), char matrix
or character string.

@strong{Caution:} For compatibility with @sc{Matlab}, Octave's strcmp
function returns 1 if the character strings are equal, and 0 otherwise.
This is just the opposite of the corresponding C library function.
@seealso{strcmpi, strncmp, strncmpi}
@end deftypefn
strncmp
-*- texinfo -*-
@deftypefn {Built-in Function} {} strncmp (@var{s1}, @var{s2}, @var{n})
Return 1 if the first @var{n} characters of strings @var{s1} and @var{s2} are the same,
and 0 otherwise.

@example
@group
strncmp ("abce", "abcd", 3)
     @result{} 1
@end group
@end example

If either @var{s1} or @var{s2} is a cell array of strings, then an array
of the same size is returned, containing the values described above for
every member of the cell array. The other argument may also be a cell
array of strings (of the same size or with only one element), char matrix
or character string.

@example
@group
strncmp ("abce", @{"abcd", "bca", "abc"@}, 3)
     @result{} [1, 0, 1]
@end group
@end example

@strong{Caution:} For compatibility with @sc{Matlab}, Octave's strncmp
function returns 1 if the character strings are equal, and 0 otherwise.
This is just the opposite of the corresponding C library function.
@seealso{strncmpi, strcmp, strcmpi}
@end deftypefn
list_in_columns
-*- texinfo -*-
@deftypefn {Built-in Function} {} list_in_columns (@var{arg}, @var{width})
Return a string containing the elements of @var{arg} listed in
columns with an overall maximum width of @var{width}.  The argument
@var{arg} must be a cell array of character strings or a character array.
If @var{width} is not specified, the width of the terminal screen is used.
@seealso{terminal_size}
@end deftypefn
svd
-*- texinfo -*-
@deftypefn {Loadable Function} {@var{s} =} svd (@var{a})
@deftypefnx {Loadable Function} {[@var{u}, @var{s}, @var{v}] =} svd (@var{a})
@cindex singular value decomposition
Compute the singular value decomposition of @var{a}
@iftex
@tex
$$
 A = U S V^H
$$
@end tex
@end iftex
@ifinfo

@example
A = U*S*V'
@end example
@end ifinfo

The function @code{svd} normally returns the vector of singular values.
If asked for three return values, it computes
@iftex
@tex
$U$, $S$, and $V$.
@end tex
@end iftex
@ifinfo
U, S, and V.
@end ifinfo
For example,

@example
svd (hilb (3))
@end example

@noindent
returns

@example
ans =

  1.4083189
  0.1223271
  0.0026873
@end example

@noindent
and

@example
[u, s, v] = svd (hilb (3))
@end example

@noindent
returns

@example
u =

  -0.82704   0.54745   0.12766
  -0.45986  -0.52829  -0.71375
  -0.32330  -0.64901   0.68867

s =

  1.40832  0.00000  0.00000
  0.00000  0.12233  0.00000
  0.00000  0.00000  0.00269

v =

  -0.82704   0.54745   0.12766
  -0.45986  -0.52829  -0.71375
  -0.32330  -0.64901   0.68867
@end example

If given a second argument, @code{svd} returns an economy-sized
decomposition, eliminating the unnecessary rows or columns of @var{u} or
@var{v}.
@end deftypefn
syl
-*- texinfo -*-
@deftypefn {Loadable Function} {@var{x} =} syl (@var{a}, @var{b}, @var{c})
Solve the Sylvester equation
@iftex
@tex
$$
 A X + X B + C = 0
$$
@end tex
@end iftex
@ifinfo

@example
A X + X B + C = 0
@end example
@end ifinfo
using standard @sc{Lapack} subroutines.  For example,

@example
@group
syl ([1, 2; 3, 4], [5, 6; 7, 8], [9, 10; 11, 12])
     @result{} [ -0.50000, -0.66667; -0.66667, -0.50000 ]
@end group
@end example
@end deftypefn
symrcm
-*- texinfo -*-
@deftypefn {Loadable Function} {@var{p} = } symrcm (@var{S})
Symmetric reverse Cuthill-McKee permutation of @var{S}.
Return a permutation vector @var{p} such that
@code{@var{S} (@var{p}, @var{p})} tends to have its diagonal elements
closer to the diagonal than @var{S}.  This is a good preordering for LU
or Cholesky factorization of matrices that come from 'long, skinny'
problems.  It works for both symmetric and asymmetric @var{S}.

The algorithm represents a heuristic approach to the NP-complete
bandwidth minimization problem.  The implementation is based in the
descriptions found in

E. Cuthill, J. McKee: Reducing the Bandwidth of Sparse Symmetric
Matrices. Proceedings of the 24th ACM National Conference, 157-172
1969, Brandon Press, New Jersey.

Alan George, Joseph W. H. Liu: Computer Solution of Large Sparse
Positive Definite Systems, Prentice Hall Series in Computational
Mathematics, ISBN 0-13-165274-5, 1981.

@seealso{colperm, colamd, symamd}
@end deftypefn
debug_symtab_lookups
-*- texinfo -*-
@deftypefn {Built-in Function} {@var{val} =} debug_symtab_lookups ()
@deftypefnx {Built-in Function} {@var{old_val} =} debug_symtab_lookups (@var{new_val})
Query or set the internal variable that controls whether debugging
information is printed when searching for symbols in the symbol tables.
@end deftypefn
whos_line_format
-*- texinfo -*-
@deftypefn {Built-in Function} {@var{val} =} whos_line_format ()
@deftypefnx {Built-in Function} {@var{old_val} =} whos_line_format (@var{new_val})
Query or set the format string used by the @code{whos}.

The following escape sequences may be used in the format:
@table @code
@item %b
Prints number of bytes occupied by variables.
@item %c
Prints class names of variables.
@item %e
Prints elements held by variables.
@item %n
Prints variable names.
@item %p
Prints protection attributtes of variables.
@item %s
Prints dimensions of variables.
@item %t
Prints type names of variables.
@end table

Every command may also have a modifier:
@table @code
@item l
Left alignment.
@item r
Right alignment (this is the default).
@item c
Centered (may only be applied to command %s).
@end table

A command is composed like this:
%[modifier]<command>[:size_of_parameter[:center-specific[:print_dims[:balance]]]];

Command and modifier is already explained. Size_of_parameter
tells how many columns the parameter will need for printing.
print_dims tells how many dimensions to print. If number of
dimensions exceeds print_dims, dimensions will be printed like
x-D.
center-specific and print_dims may only be applied to command
%s. A negative value for print_dims will cause Octave to print all
dimensions whatsoever.
balance specifies the offset for printing of the dimensions string.

The default format is "  %p:4; %ln:6; %cs:16:6:8:1;  %rb:12;  %lc:-1;\n".
@end deftypefn
variables_can_hide_functions
-*- texinfo -*-
@deftypefn {Built-in Function} {@var{val} =} variables_can_hide_functions ()
@deftypefnx {Built-in Function} {@var{old_val} =} variables_can_hide_functions (@var{new_val})
Query or set the internal variable that controls whether assignments
to variables may hide previously defined functions of the same name.
If set to a nonzero value allows hiding, zero causes Octave to
generate an error, and a negative value cause Octave to print a
warning, but allow the operation.
@end deftypefn
dup2
-*- texinfo -*-
@deftypefn {Built-in Function} {[@var{fid}, @var{msg}] =} dup2 (@var{old}, @var{new})
Duplicate a file descriptor.

If successful, @var{fid} is greater than zero and contains the new file
ID.  Otherwise, @var{fid} is negative and @var{msg} contains a
system-dependent error message.
@end deftypefn
exec
-*- texinfo -*-
@deftypefn {Built-in Function} {[@var{err}, @var{msg}] =} exec (@var{file}, @var{args})
Replace current process with a new process.  Calling @code{exec} without
first calling @code{fork} will terminate your current Octave process and
replace it with the program named by @var{file}.  For example,

@example
exec ("ls" "-l")
@end example

@noindent
will run @code{ls} and return you to your shell prompt.

If successful, @code{exec} does not return.  If @code{exec} does return,
@var{err} will be nonzero, and @var{msg} will contain a system-dependent
error message.
@end deftypefn
popen2
-*- texinfo -*-
@deftypefn {Built-in Function} {[@var{in}, @var{out}, @var{pid}] =} popen2 (@var{command}, @var{args})
Start a subprocess with two-way communication.  The name of the process
is given by @var{command}, and @var{args} is an array of strings
containing options for the command.  The file identifiers for the input
and output streams of the subprocess are returned in @var{in} and
@var{out}.  If execution of the command is successful, @var{pid}
contains the process ID of the subprocess.  Otherwise, @var{pid} is
@minus{}1.

For example,

@example
@group
[in, out, pid] = popen2 ("sort", "-nr");
fputs (in, "these\nare\nsome\nstrings\n");
fclose (in);
EAGAIN = errno ("EAGAIN");
done = false;
do
  s = fgets (out);
  if (ischar (s))
    fputs (stdout, s);
  elseif (errno () == EAGAIN)
    sleep (0.1);
    fclear (out);
  else
    done = true;
  endif
until (done)
fclose (out);
     @print{} are
     @print{} some
     @print{} strings
     @print{} these
@end group
@end example
@end deftypefn
fcntl
-*- texinfo -*-
@deftypefn {Built-in Function} {[@var{err}, @var{msg}] =} fcntl (@var{fid}, @var{request}, @var{arg})
Change the properties of the open file @var{fid}.  The following values
may be passed as @var{request}:

@vtable @code
@item F_DUPFD
Return a duplicate file descriptor.

@item F_GETFD
Return the file descriptor flags for @var{fid}.

@item F_SETFD
Set the file descriptor flags for @var{fid}.

@item F_GETFL
Return the file status flags for @var{fid}.  The following codes may be
returned (some of the flags may be undefined on some systems).

@vtable @code
@item O_RDONLY
Open for reading only.

@item O_WRONLY
Open for writing only.

@item O_RDWR
Open for reading and writing.

@item O_APPEND
Append on each write.

@item O_CREAT
Create the file if it does not exist.

@item O_NONBLOCK
Nonblocking mode.

@item O_SYNC
Wait for writes to complete.

@item O_ASYNC
Asynchronous I/O.
@end vtable

@item F_SETFL
Set the file status flags for @var{fid} to the value specified by
@var{arg}.  The only flags that can be changed are @code{O_APPEND} and
@code{O_NONBLOCK}.
@end vtable

If successful, @var{err} is 0 and @var{msg} is an empty string.
Otherwise, @var{err} is nonzero and @var{msg} contains a
system-dependent error message.
@end deftypefn
fork
-*- texinfo -*-
@deftypefn {Built-in Function} {[@var{pid}, @var{msg}] =} fork ()
Create a copy of the current process.

Fork can return one of the following values:

@table @asis
@item > 0
You are in the parent process.  The value returned from @code{fork} is
the process id of the child process.  You should probably arrange to
wait for any child processes to exit.

@item 0
You are in the child process.  You can call @code{exec} to start another
process.  If that fails, you should probably call @code{exit}.

@item < 0
The call to @code{fork} failed for some reason.  You must take evasive
action.  A system dependent error message will be waiting in @var{msg}.
@end table
@end deftypefn
getpgrp
-*- texinfo -*-
@deftypefn {Built-in Function} {pgid =} getpgrp ()
Return the process group id of the current process.
@end deftypefn
getpid
-*- texinfo -*-
@deftypefn {Built-in Function} {pid =} getpid ()
Return the process id of the current process.
@end deftypefn
getppid
-*- texinfo -*-
@deftypefn {Built-in Function} {pid =} getppid ()
Return the process id of the parent process.
@end deftypefn
getegid
-*- texinfo -*-
@deftypefn {Built-in Function} {egid =} getegid ()
Return the effective group id of the current process.
@end deftypefn
getgid
-*- texinfo -*-
@deftypefn {Built-in Function} {gid =} getgid ()
Return the real group id of the current process.
@end deftypefn
geteuid
-*- texinfo -*-
@deftypefn {Built-in Function} {euid =} geteuid ()
Return the effective user id of the current process.
@end deftypefn
getuid
-*- texinfo -*-
@deftypefn {Built-in Function} {uid =} getuid ()
Return the real user id of the current process.
@end deftypefn
kill
-*- texinfo -*-
@deftypefn {Built-in Function} {[@var{err}, @var{msg}] =} kill (@var{pid}, @var{sig})
Send signal @var{sig} to process @var{pid}.

If @var{pid} is positive, then signal @var{sig} is sent to @var{pid}.

If @var{pid} is 0, then signal @var{sig} is sent to every process
in the process group of the current process.

If @var{pid} is -1, then signal @var{sig} is sent to every process
except process 1.

If @var{pid} is less than -1, then signal @var{sig} is sent to every
process in the process group @var{-pid}.

If @var{sig} is 0, then no signal is sent, but error checking is still
performed.

Return 0 if sucessful, otherwise return -1.
@end deftypefn
lstat
-*- texinfo -*-
@deftypefn {Built-in Function} {[@var{info}, @var{err}, @var{msg}] =} lstat (@var{file})
See stat.
@end deftypefn
mkfifo
-*- texinfo -*-
@deftypefn {Built-in Function} {[@var{err}, @var{msg}] =} mkfifo (@var{name}, @var{mode})
Create a @var{fifo} special file named @var{name} with file mode @var{mode}

If successful, @var{err} is 0 and @var{msg} is an empty string.
Otherwise, @var{err} is nonzero and @var{msg} contains a
system-dependent error message.
@end deftypefn
pipe
-*- texinfo -*-
@deftypefn {Built-in Function} {[@var{read_fd}, @var{write_fd}, @var{err}, @var{msg}] =} pipe ()
Create a pipe and return the reading and writing ends of the pipe
into @var{read_fd} and @var{write_fd} respectively.

If successful, @var{err} is 0 and @var{msg} is an empty string.
Otherwise, @var{err} is nonzero and @var{msg} contains a
system-dependent error message.
@end deftypefn
stat
-*- texinfo -*-
@deftypefn {Built-in Function} {[@var{info}, @var{err}, @var{msg}] =} stat (@var{file})
@deftypefnx {Built-in Function} {[@var{info}, @var{err}, @var{msg}] =} lstat (@var{file})
Return a structure @var{s} containing the following information about
@var{file}.

@table @code
@item dev
ID of device containing a directory entry for this file.

@item ino
File number of the file.

@item mode
File mode, as an integer.  Use the functions @code{S_ISREG},
@code{S_ISDIR}, @code{S_ISCHR}, @code{S_ISBLK}, @code{S_ISFIFO},
@code{S_ISLNK}, or @code{S_ISSOCK} to extract information from this
value.

@item modestr
File mode, as a string of ten letters or dashes as would be returned by
@kbd{ls -l}.

@item nlink
Number of links.

@item uid
User ID of file's owner.

@item gid
Group ID of file's group.

@item rdev
ID of device for block or character special files.

@item size
Size in bytes.

@item atime
Time of last access in the same form as time values returned from
@code{time}.  @xref{Timing Utilities}.

@item mtime
Time of last modification in the same form as time values returned from
@code{time}.  @xref{Timing Utilities}.

@item ctime
Time of last file status change in the same form as time values
returned from @code{time}.  @xref{Timing Utilities}.

@item blksize
Size of blocks in the file.

@item blocks
Number of blocks allocated for file.
@end table

If the call is successful @var{err} is 0 and @var{msg} is an empty
string.  If the file does not exist, or some other error occurs, @var{s}
is an empty matrix, @var{err} is @minus{}1, and @var{msg} contains the
corresponding system error message.

If @var{file} is a symbolic link, @code{stat} will return information
about the actual file the is referenced by the link.  Use @code{lstat}
if you want information about the symbolic link itself.

For example,

@example
@group
[s, err, msg] = stat ("/vmlinuz")
      @result{} s =
        @{
          atime = 855399756
          rdev = 0
          ctime = 847219094
          uid = 0
          size = 389218
          blksize = 4096
          mtime = 847219094
          gid = 6
          nlink = 1
          blocks = 768
          mode = -rw-r--r--
          modestr = -rw-r--r--
          ino = 9316
          dev = 2049
        @}
     @result{} err = 0
     @result{} msg = 
@end group
@end example
@end deftypefn
S_ISREG
-*- texinfo -*-
@deftypefn {Built-in Function} {} S_ISREG (@var{mode})
Return true if @var{mode} corresponds to a regular file.  The value
of @var{mode} is assumed to be returned from a call to @code{stat}.
@seealso{stat, lstat}
@end deftypefn
S_ISDIR
-*- texinfo -*-
@deftypefn {Built-in Function} {} S_ISDIR (@var{mode})
Return true if @var{mode} corresponds to a directory.  The value
of @var{mode} is assumed to be returned from a call to @code{stat}.
@seealso{stat, lstat}
@end deftypefn
S_ISCHR
-*- texinfo -*-
@deftypefn {Built-in Function} {} S_ISCHR (@var{mode})
Return true if @var{mode} corresponds to a character devicey.  The value
of @var{mode} is assumed to be returned from a call to @code{stat}.
@seealso{stat, lstat}
@end deftypefn
S_ISBLK
-*- texinfo -*-
@deftypefn {Built-in Function} {} S_ISBLK (@var{mode})
Return true if @var{mode} corresponds to a block device.  The value
of @var{mode} is assumed to be returned from a call to @code{stat}.
@seealso{stat, lstat}
@end deftypefn
S_ISFIFO
-*- texinfo -*-
@deftypefn {Built-in Function} {} S_ISFIFO (@var{mode})
Return true if @var{mode} corresponds to a fifo.  The value
of @var{mode} is assumed to be returned from a call to @code{stat}.
@seealso{stat, lstat}
@end deftypefn
S_ISLNK
-*- texinfo -*-
@deftypefn {Built-in Function} {} S_ISLNK (@var{mode})
Return true if @var{mode} corresponds to a symbolic link.  The value
of @var{mode} is assumed to be returned from a call to @code{stat}.
@seealso{stat, lstat}
@end deftypefn
S_ISSOCK
-*- texinfo -*-
@deftypefn {Built-in Function} {} S_ISSOCK (@var{mode})
@seealso{stat, lstat}
@end deftypefn
uname
-*- texinfo -*-
@deftypefn {Built-in Function} {[@var{uts}, @var{err}, @var{msg}] =} uname ()
Return system information in the structure.  For example,

@example
@group
uname ()
     @result{} @{
           sysname = x86_64
           nodename = segfault
           release = 2.6.15-1-amd64-k8-smp
           version = Linux
           machine = #2 SMP Thu Feb 23 04:57:49 UTC 2006
         @}
@end group
@end example

If successful, @var{err} is 0 and @var{msg} is an empty string.
Otherwise, @var{err} is nonzero and @var{msg} contains a
system-dependent error message.
@end deftypefn
unlink
-*- texinfo -*-
@deftypefn {Built-in Function} {[@var{err}, @var{msg}] =} unlink (@var{file})
Delete the file named @var{file}.

If successful, @var{err} is 0 and @var{msg} is an empty string.
Otherwise, @var{err} is nonzero and @var{msg} contains a
system-dependent error message.
@end deftypefn
waitpid
-*- texinfo -*-
@deftypefn {Built-in Function} {[@var{pid}, @var{status}, @var{msg}] =} waitpid (@var{pid}, @var{options})
Wait for process @var{pid} to terminate.  The @var{pid} argument can be:

@table @asis
@item @minus{}1
Wait for any child process.

@item 0
Wait for any child process whose process group ID is equal to that of
the Octave interpreter process.

@item > 0
Wait for termination of the child process with ID @var{pid}.
@end table

The @var{options} argument can be a bitwise OR of zero or more of
the following constants:

@table @code
@item 0
Wait until signal is received or a child process exits (this is the
default if the @var{options} argument is missing).

@item WNOHANG
Do not hang if status is not immediately available.

@item WUNTRACED
Report the status of any child processes that are stopped, and whose
status has not yet been reported since they stopped.

@item WCONTINUED
Return if a stopped child has been resumed by delivery of @code{SIGCONT}.
This value may not be meaningful on all systems.
@end table

If the returned value of @var{pid} is greater than 0, it is the process
ID of the child process that exited.  If an error occurs, @var{pid} will
be less than zero and @var{msg} will contain a system-dependent error
message.  The value of @var{status} contains additional system-depenent
information about the subprocess that exited.
@seealso{WNOHANG, WUNTRACED, WCONTINUED, WEXITSTATUS, WIFSIGNALED, WTERMSIG, WCOREDUMP, WIFSTOPPED, WSTOPSIG, WIFCONTINUED}
@end deftypefn
WIFEXITED
-*- texinfo -*-
@deftypefn {Built-in Function} {} WIFEXITED (@var{status})
Given @var{status} from a call to @code{waitpid}, return true if the
child terminated normally.
@seealso{waitpid, WEXITSTATUS, WIFSIGNALED, WTERMSIG, WCOREDUMP, WIFSTOPPED, WSTOPSIG, WIFCONTINUED}
@end deftypefn
WEXITSTATUS
-*- texinfo -*-
@deftypefn {Built-in Function} {} WEXITSTATUS (@var{status})
Given @var{status} from a call to @code{waitpid}, return the exit
status of the child.  This function should only be employed if
@code{WIFEXITED} returned true.
@seealso{waitpid, WIFEXITED, WIFSIGNALED, WTERMSIG, WCOREDUMP, WIFSTOPPED, WSTOPSIG, WIFCONTINUED}
@end deftypefn
WIFSIGNALED
-*- texinfo -*-
@deftypefn {Built-in Function} {} WIFSIGNALED (@var{status})
Given @var{status} from a call to @code{waitpid}, return true if the
child process was terminated by a signal.
@seealso{waitpid, WIFEXITED, WEXITSTATUS, WTERMSIG, WCOREDUMP, WIFSTOPPED, WSTOPSIG, WIFCONTINUED}
@end deftypefn
WTERMSIG
-*- texinfo -*-
@deftypefn {Built-in Function} {} WTERMSIG (@var{status})
Given @var{status} from a call to @code{waitpid}, return the number of
the signal that caused the child process to terminate. This function
should only be employed if @code{WIFSIGNALED} returned true.
@seealso{waitpid, WIFEXITED, WEXITSTATUS, WIFSIGNALED, WCOREDUMP, WIFSTOPPED, WSTOPSIG, WIFCONTINUED}
@end deftypefn
WCOREDUMP
-*- texinfo -*-
@deftypefn {Built-in Function} {} WCOREDUMP (@var{status})
Given @var{status} from a call to @code{waitpid}, return true if the
child produced a core dump.  This function should only be employed if
@code{WIFSIGNALED} returned true.  The macro used to implement this
function is not specified in POSIX.1-2001 and is not available on some
Unix implementations (e.g., AIX, SunOS).
@seealso{waitpid, WIFEXITED, WEXITSTATUS, WIFSIGNALED, WTERMSIG, WIFSTOPPED, WSTOPSIG, WIFCONTINUED}
@end deftypefn
WIFSTOPPED
-*- texinfo -*-
@deftypefn {Built-in Function} {} WIFSTOPPED (@var{status})
Given @var{status} from a call to @code{waitpid}, return true if the
child process was stopped by delivery of a signal; this is only
possible if the call was done using @code{WUNTRACED} or when the child
is being traced (see ptrace(2)).
@seealso{waitpid, WIFEXITED, WEXITSTATUS, WIFSIGNALED, WTERMSIG, WCOREDUMP, WSTOPSIG, WIFCONTINUED}
@end deftypefn
WSTOPSIG
-*- texinfo -*-
@deftypefn {Built-in Function} {} WSTOPSIG (@var{status})
Given @var{status} from a call to @code{waitpid}, return the number of
the signal which caused the child to stop.  This function should only
be employed if @code{WIFSTOPPED} returned true.
@seealso{waitpid, WIFEXITED, WEXITSTATUS, WIFSIGNALED, WTERMSIG, WCOREDUMP, WIFSTOPPED, WIFCONTINUED}
@end deftypefn
WIFCONTINUED
-*- texinfo -*-
@deftypefn {Built-in Function} {} WIFCONTINUED (@var{status})
Given @var{status} from a call to @code{waitpid}, return true if the
child process was resumed by delivery of @code{SIGCONT}.
@seealso{waitpid, WIFEXITED, WEXITSTATUS, WIFSIGNALED, WTERMSIG, WCOREDUMP, WIFSTOPPED, WSTOPSIG}
@end deftypefn
canonicalize_file_name
-*- texinfo -*-
@deftypefn {Built-in Function} {[@var{cname}, @var{status}, @var{msg}]} canonicalize_file_name (@var{name})
Return the canonical name of file @var{name}.
@end deftypefn
F_DUPFD
-*- texinfo -*-
@deftypefn {Built-in Function} {} F_DUPFD ()
Return the value required to request that @code{fcntl} return a
duplicate file descriptor.
@seealso{fcntl, F_GETFD, F_GETFL, F_SETFD, F_SETFL}
@end deftypefn
F_GETFD
-*- texinfo -*-
@deftypefn {Built-in Function} {} F_GETFD ()
Return the value required to request that @code{fcntl} to return the
file descriptor flags.
@seealso{fcntl, F_DUPFD, F_GETFL, F_SETFD, F_SETFL}
@end deftypefn
F_GETFL
-*- texinfo -*-
@deftypefn {Built-in Function} {} F_GETFL ()
Return the value required to request that @code{fcntl} to return the
file status flags.
@seealso{fcntl, F_DUPFD, F_GETFD, F_SETFD, F_SETFL}
@end deftypefn
F_SETFD
-*- texinfo -*-
@deftypefn {Built-in Function} {} F_SETFD ()
Return the value required to request that @code{fcntl} to set the file
descriptor flags.
@seealso{fcntl, F_DUPFD, F_GETFD, F_GETFL, F_SETFL}
@end deftypefn
F_SETFL
-*- texinfo -*-
@deftypefn {Built-in Function} {} F_SETFL ()
Return the value required to request that @code{fcntl} to set the file
status flags.
@seealso{fcntl, F_DUPFD, F_GETFD, F_GETFL, F_SETFD}
@end deftypefn
O_APPEND
-*- texinfo -*-
@deftypefn {Built-in Function} {} O_APPEND ()
Return the numerical value of the file status flag that may be
returned by @code{fcntl} to indicate each write operation appends,
or that may be passed to @code{fcntl} to set the write mode to append.@seealso{fcntl, O_ASYNC, O_CREAT, O_EXCL, O_NONBLOCK, O_RDONLY, O_RDWR, O_SYNC, O_TRUNC, O_WRONLY}
@end deftypefn
O_ASYNC
-*- texinfo -*-
@deftypefn {Built-in Function} {} O_ASYNC ()
Return the numerical value of the file status flag that may be
returned by @code{fcntl} to indicate asynchronous I/O.
@seealso{fcntl, O_APPEND, O_CREAT, O_EXCL, O_NONBLOCK, O_RDONLY, O_RDWR, O_SYNC, O_TRUNC, O_WRONLY}
@end deftypefn
O_CREAT
-*- texinfo -*-
@deftypefn {Built-in Function} {} O_CREAT ()
Return the numerical value of the file status flag that may be
returned by @code{fcntl} to indicate that a file should be
created if it does not exist.
@seealso{fcntl, O_APPEND, O_ASYNC, O_EXCL, O_NONBLOCK, O_RDONLY, O_RDWR, O_SYNC, O_TRUNC, O_WRONLY}
@end deftypefn
O_EXCL
-*- texinfo -*-
@deftypefn {Built-in Function} {} O_EXCL ()
Return the numerical value of the file status flag that may be
returned by @code{fcntl} to indicate that file locking is used.
@seealso{fcntl, O_APPEND, O_ASYNC, O_CREAT, O_NONBLOCK, O_RDONLY, O_RDWR, O_SYNC, O_TRUNC, O_WRONLY}
@end deftypefn
O_NONBLOCK
-*- texinfo -*-
@deftypefn {Built-in Function} {} O_NONBLOCK ()
Return the numerical value of the file status flag that may be
returned by @code{fcntl} to indicate that non-blocking I/O is in use,
or that may be passsed to @code{fcntl} to set non-blocking I/O.
@seealso{fcntl, O_APPEND, O_ASYNC, O_CREAT, O_EXCL, O_RDONLY, O_RDWR, O_SYNC, O_TRUNC, O_WRONLY}
@end deftypefn
O_RDONLY
-*- texinfo -*-
@deftypefn {Built-in Function} {} O_RDONLY ()
Return the numerical value of the file status flag that may be
returned by @code{fcntl} to indicate that a file is open for
reading only.
@seealso{fcntl, O_APPEND, O_ASYNC, O_CREAT, O_EXCL, O_NONBLOCK, O_RDWR, O_SYNC, O_TRUNC, O_WRONLY}
@end deftypefn
O_RDWR
-*- texinfo -*-
@deftypefn {Built-in Function} {} O_RDWR ()
Return the numerical value of the file status flag that may be
returned by @code{fcntl} to indicate that a file is open for both
reading and writing.
@seealso{fcntl, O_APPEND, O_ASYNC, O_CREAT, O_EXCL, O_NONBLOCK, O_RDONLY, O_SYNC, O_TRUNC, O_WRONLY}
@end deftypefn
O_SYNC
-*- texinfo -*-
@deftypefn {Built-in Function} {} O_SYNC ()
Return the numerical value of the file status flag that may be
returned by @code{fcntl} to indicate that a file is open for
synchronous I/O.
@seealso{fcntl, O_APPEND, O_ASYNC, O_CREAT, O_EXCL, O_NONBLOCK, O_RDONLY, O_RDWR, O_TRUNC, O_WRONLY}
@end deftypefn
O_TRUNC
-*- texinfo -*-
@deftypefn {Built-in Variable} O_TRUNC ()
Return the numerical value of the file status flag that may be
returned by @code{fcntl} to indicate that if file exists, it should
be truncated when writing.
@seealso{fcntl, O_APPEND, O_ASYNC, O_CREAT, O_EXCL, O_NONBLOCK, O_RDONLY, O_RDWR, O_SYNC, O_WRONLY}
@end deftypefn
O_WRONLY
-*- texinfo -*-
@deftypefn {Built-in Function} {} O_WRONLY ()
Return the numerical value of the file status flag that may be
returned by @code{fcntl} to indicate that a file is open for
writing only.
@seealso{fcntl, O_APPEND, O_ASYNC, O_CREAT, O_EXCL, O_NONBLOCK, O_RDONLY, O_RDWR, O_SYNC, O_TRUNC}
@end deftypefn
WNOHANG
-*- texinfo -*-
@deftypefn {Built-in Function} {} WNOHANG ()
Return the numerical value of the option argument that may be
passed to @code{waitpid} to indicate that it should return its
status immediately instead of waiting for a process to exit.
@seealso{waitpid, WUNTRACED, WCONTINUE}
@end deftypefn
WUNTRACED
-*- texinfo -*-
@deftypefn {Built-in Function} {} WUNTRACED ()
Return the numerical value of the option argument that may be
passed to @code{waitpid} to indicate that it should also return
if the child process has stopped but is not traced via the
@code{ptrace} system call
@seealso{waitpid, WNOHANG, WCONTINUE}
@end deftypefn
WCONTINUE
-*- texinfo -*-
@deftypefn {Built-in Function} WCONINTUE ()
Return the numerical value of the option argument that may be
passed to @code{waitpid} to indicate that it should also return
if a stopped child has been resumed by delivery of a @code{SIGCONT}
signal.
@seealso{waitpid, WNOHANG, WUNTRACED}
@end deftypefn
clc
-*- texinfo -*-
@deftypefn {Built-in Function} {} clc ()
@deftypefnx {Built-in Function} {} home ()
Clear the terminal screen and move the cursor to the upper left corner.
@end deftypefn
getenv
-*- texinfo -*-
@deftypefn {Built-in Function} {} getenv (@var{var})
Return the value of the environment variable @var{var}.  For example,

@example
getenv ("PATH")
@end example

@noindent
returns a string containing the value of your path.
@end deftypefn
putenv
-*- texinfo -*-
@deftypefn {Built-in Function} {} putenv (@var{var}, @var{value})
Set the value of the environment variable @var{var} to @var{value}.
@end deftypefn
kbhit
-*- texinfo -*-
@deftypefn {Built-in Function} {} kbhit ()
Read a single keystroke from the keyboard. If called with one
argument, don't wait for a keypress.  For example,

@example
x = kbhit ();
@end example

@noindent
will set @var{x} to the next character typed at the keyboard as soon as
it is typed.

@example
x = kbhit (1);
@end example

@noindent
identical to the above example, but don't wait for a keypress,
returning the empty string if no key is available.
@end deftypefn
pause
-*- texinfo -*-
@deftypefn {Built-in Function} {} pause (@var{seconds})
Suspend the execution of the program.  If invoked without any arguments,
Octave waits until you type a character.  With a numeric argument, it
pauses for the given number of seconds.  For example, the following
statement prints a message and then waits 5 seconds before clearing the
screen.

@example
@group
fprintf (stderr, "wait please...\n");
pause (5);
clc;
@end group
@end example
@end deftypefn
sleep
-*- texinfo -*-
@deftypefn {Built-in Function} {} sleep (@var{seconds})
Suspend the execution of the program for the given number of seconds.
@end deftypefn
usleep
-*- texinfo -*-
@deftypefn {Built-in Function} {} usleep (@var{microseconds})
Suspend the execution of the program for the given number of
microseconds.  On systems where it is not possible to sleep for periods
of time less than one second, @code{usleep} will pause the execution for
@code{round (@var{microseconds} / 1e6)} seconds.
@end deftypefn
isieee
-*- texinfo -*-
@deftypefn {Built-in Function} {} isieee ()
Return 1 if your computer claims to conform to the IEEE standard for
floating point calculations.
@end deftypefn
native_float_format
-*- texinfo -*-
@deftypefn {Built-in Function} {} native_float_format ()
Return the native floating point format as a string
@end deftypefn
tilde_expand
-*- texinfo -*-
@deftypefn {Built-in Function} {} tilde_expand (@var{string})
Performs tilde expansion on @var{string}.  If @var{string} begins with a
tilde character, (@samp{~}), all of the characters preceding the first
slash (or all characters, if there is no slash) are treated as a
possible user name, and the tilde and the following characters up to the
slash are replaced by the home directory of the named user.  If the
tilde is followed immediately by a slash, the tilde is replaced by the
home directory of the user running Octave.  For example,

@example
@group
tilde_expand ("~joeuser/bin")
     @result{} "/home/joeuser/bin"
tilde_expand ("~/bin")
     @result{} "/home/jwe/bin"
@end group
@end example
@end deftypefn
time
-*- texinfo -*-
@deftypefn {Loadable Function} {} time ()
Return the current time as the number of seconds since the epoch.  The
epoch is referenced to 00:00:00 CUT (Coordinated Universal Time) 1 Jan
1970.  For example, on Monday February 17, 1997 at 07:15:06 CUT, the
value returned by @code{time} was 856163706.
@seealso{strftime, strptime, localtime, gmtime, mktime, now, date, clock, datenum, datestr, datevec, calendar, weekday}
@end deftypefn
gmtime
-*- texinfo -*-
@deftypefn {Loadable Function} {} gmtime (@var{t})
Given a value returned from time (or any nonnegative integer),
return a time structure corresponding to CUT.  For example,

@example
@group
gmtime (time ())
     @result{} @{
           usec = 0
           year = 97
           mon = 1
           mday = 17
           sec = 6
           zone = CST
           min = 15
           wday = 1
           hour = 7
           isdst = 0
           yday = 47
         @}
@end group
@end example
@seealso{strftime, strptime, localtime, mktime, time, now, date, clock, datenum, datestr, datevec, calendar, weekday}
@end deftypefn
localtime
-*- texinfo -*-
@deftypefn {Loadable Function} {} localtime (@var{t})
Given a value returned from time (or any nonnegative integer),
return a time structure corresponding to the local time zone.

@example
@group
localtime (time ())
     @result{} @{
           usec = 0
           year = 97
           mon = 1
           mday = 17
           sec = 6
           zone = CST
           min = 15
           wday = 1
           hour = 1
           isdst = 0
           yday = 47
         @}
@end group
@end example
@seealso{strftime, strptime, gmtime, mktime, time, now, date, clock, datenum, datestr, datevec, calendar, weekday}
@end deftypefn
mktime
-*- texinfo -*-
@deftypefn {Loadable Function} {} mktime (@var{tm_struct})
Convert a time structure corresponding to the local time to the number
of seconds since the epoch.  For example,

@example
@group
mktime (localtime (time ())
     @result{} 856163706
@end group
@end example
@seealso{strftime, strptime, localtime, gmtime, time, now, date, clock, datenum, datestr, datevec, calendar, weekday}
@end deftypefn
strftime
-*- texinfo -*-
@deftypefn {Loadable Function} {} strftime (@var{fmt}, @var{tm_struct})
Format the time structure @var{tm_struct} in a flexible way using the
format string @var{fmt} that contains @samp{%} substitutions
similar to those in @code{printf}.  Except where noted, substituted
fields have a fixed size; numeric fields are padded if necessary.
Padding is with zeros by default; for fields that display a single
number, padding can be changed or inhibited by following the @samp{%}
with one of the modifiers described below.  Unknown field specifiers are
copied as normal characters.  All other characters are copied to the
output without change.  For example,

@example
@group
strftime ("%r (%Z) %A %e %B %Y", localtime (time ()))
     @result{} "01:15:06 AM (CST) Monday 17 February 1997"
@end group
@end example

Octave's @code{strftime} function supports a superset of the ANSI C
field specifiers.

@noindent
Literal character fields:

@table @code
@item %
% character.

@item n
Newline character.

@item t
Tab character.
@end table

@noindent
Numeric modifiers (a nonstandard extension):

@table @code
@item - (dash)
Do not pad the field.

@item _ (underscore)
Pad the field with spaces.
@end table

@noindent
Time fields:

@table @code
@item %H
Hour (00-23).

@item %I
Hour (01-12).

@item %k
Hour (0-23).

@item %l
Hour (1-12).

@item %M
Minute (00-59).

@item %p
Locale's AM or PM.

@item %r
Time, 12-hour (hh:mm:ss [AP]M).

@item %R
Time, 24-hour (hh:mm).

@item %s
Time in seconds since 00:00:00, Jan 1, 1970 (a nonstandard extension).

@item %S
Second (00-61).

@item %T
Time, 24-hour (hh:mm:ss).

@item %X
Locale's time representation (%H:%M:%S).

@item %Z
Time zone (EDT), or nothing if no time zone is determinable.
@end table

@noindent
Date fields:

@table @code
@item %a
Locale's abbreviated weekday name (Sun-Sat).

@item %A
Locale's full weekday name, variable length (Sunday-Saturday).

@item %b
Locale's abbreviated month name (Jan-Dec).

@item %B
Locale's full month name, variable length (January-December).

@item %c
Locale's date and time (Sat Nov 04 12:02:33 EST 1989).

@item %C
Century (00-99).

@item %d
Day of month (01-31).

@item %e
Day of month ( 1-31).

@item %D
Date (mm/dd/yy).

@item %h
Same as %b.

@item %j
Day of year (001-366).

@item %m
Month (01-12).

@item %U
Week number of year with Sunday as first day of week (00-53).

@item %w
Day of week (0-6).

@item %W
Week number of year with Monday as first day of week (00-53).

@item %x
Locale's date representation (mm/dd/yy).

@item %y
Last two digits of year (00-99).

@item %Y
Year (1970-).
@end table
@seealso{strptime, localtime, gmtime, mktime, time, now, date, clock, datenum, datestr, datevec, calendar, weekday}
@end deftypefn
strptime
-*- texinfo -*-
@deftypefn {Loadable Function} {[@var{tm_struct}, @var{nchars}] =} strptime (@var{str}, @var{fmt})
Convert the string @var{str} to the time structure @var{tm_struct} under
the control of the format string @var{fmt}.

If @var{fmt} fails to match, @var{nchars} is 0; otherwise it is set to the
position of last matched character plus 1. Always check for this unless
you're absolutely sure the date string will be parsed correctly.
@seealso{strftime, localtime, gmtime, mktime, time, now, date, clock, datenum, datestr, datevec, calendar, weekday}
@end deftypefn
quit
-*- texinfo -*-
@deftypefn {Built-in Function} {} exit (@var{status})
@deftypefnx {Built-in Function} {} quit (@var{status})
Exit the current Octave session.  If the optional integer value
@var{status} is supplied, pass that value to the operating system as the
Octave's exit status.  The default value is zero.
@end deftypefn
warranty
-*- texinfo -*-
@deftypefn {Built-in Function} {} warranty ()
Describe the conditions for copying and distributing Octave.
@end deftypefn
system
-*- texinfo -*-
@deftypefn {Built-in Function} {} system (@var{string}, @var{return_output}, @var{type})
Execute a shell command specified by @var{string}.  The second
argument is optional.  If @var{type} is @code{"async"}, the process
is started in the background and the process id of the child process
is returned immediately.  Otherwise, the process is started, and
Octave waits until it exits.  If @var{type} argument is omitted, a
value of @code{"sync"} is assumed.

If two input arguments are given (the actual value of
@var{return_output} is irrelevant) and the subprocess is started
synchronously, or if @var{system} is called with one input argument and
one or more output arguments, the output from the command is returned.
Otherwise, if the subprocess is executed synchronously, its output is
sent to the standard output.  To send the output of a command executed
with @var{system} through the pager, use a command like

@example
disp (system (cmd, 1));
@end example

@noindent
or

@example
printf ("%s
", system (cmd, 1));
@end example

The @code{system} function can return two values.  The first is the
exit status of the command and the second is any output from the
command that was written to the standard output stream.  For example,

@example
[status, output] = system ("echo foo; exit 2");
@end example

@noindent
will set the variable @code{output} to the string @samp{foo}, and the
variable @code{status} to the integer @samp{2}.
@end deftypefn
atexit
-*- texinfo -*-
@deftypefn {Built-in Function} {} atexit (@var{fcn})
Register a function to be called when Octave exits.  For example,

@example
@group
function bye_bye ()
  disp ("Bye bye");
endfunction
atexit ("bye_bye");
@end group
@end example

@noindent
will print the message "Bye bye" when Octave exits.

@deftypefnx {Built-in Function} {} atexit (@var{fcn}, @var{flag})
Register or unregister a function to be called when Octave exits,
depending on @var{flag}.  If @var{flag} is true, the function is
registered, if @var{flag} is false, it is unregistered.  For example,
after registering the function @code{bye_bye} as above,

@example
atexit ("bye_bye", false);
@end example

@noindent
will remove the function from the list and Octave will not call
the function @code{bye_by} when it exits.

Note that @code{atexit} only removes the first occurence of a function
from the list, so if a function was placed in the list multiple
times with @code{atexit}, it must also be removed from the list
multiple times.
@end deftypefn
octave_config_info
-*- texinfo -*-
@deftypefn {Built-in Function} {} octave_config_info (@var{option})
Return a structure containing configuration and installation
information for Octave.

if @var{option} is a string, return the configuration information for the
specified option.

@end deftypefn
tsearch
-*- texinfo -*-
@deftypefn {Loadable Function} {@var{idx} =} tsearch (@var{x}, @var{y}, @var{t}, @var{xi}, @var{yi})
Searches for the enclosing Delaunay convex hull. For @code{@var{t} =
delaunay (@var{x}, @var{y})}, finds the index in @var{t} containing the
points @code{(@var{xi}, @var{yi})}. For points outside the convex hull,
@var{idx} is NaN.
@seealso{delaunay, delaunayn}
@end deftypefn
typecast
 -*- texinfo -*-
@deftypefn {Loadable Function} {} typecast (@var{x}, @var{type})
Converts from one datatype to another without changing the underlying
data. The argument @var{type} defines the type of the return argument
and must be one of 'uint8', 'uint16', 'uint32', 'uint64', 'int8', 'int16',
'int32', 'int64', 'single' or 'double'.

An example of the use of typecast on a little-endian machine is

@example
@group
@var{x} = uint16 ([1, 65535]);
typecast (@var{x}, 'uint8')
@result{} [   0,   1, 255, 255]
@end group
@end example
@seealso{cast, swapbytes}
@end deftypefn
urlwrite
-*- texinfo -*-
@deftypefn {Loadable Function} {} urlwrite (@var{URL}, @var{localfile})
@deftypefnx {Loadable Function} {@var{f} =} urlwrite (@var{url}, @var{localfile})
@deftypefnx {Loadable Function} {[@var{f}, @var{success}] =} urlwrite (@var{url}, @var{localfile})
@deftypefnx {Loadable Function} {[@var{f}, @var{success}, @var{message}] =} urlwrite (@var{url}, @var{localfile})
Download a remote file specified by its @var{URL} and save it as
@var{localfile}.  For example,

@example
urlwrite ("ftp://ftp.octave.org/pub/octave/README", "README.txt");
@end example

The full path of the downloaded file is returned in @var{f}.  The
variable @var{success} is 1 if the download was successful,
otherwise it is 0 in which case @var{message} contains an error
message.  If no output argument is specified and if an error occurs,
then the error is signaled through Octave's error handling mechanism.

This function uses libcurl.  Curl supports, among others, the HTTP,
FTP and FILE protocols.  Username and password may be specified in
the URL, for example:

@example
urlwrite ("http://username:password@@example.com/file.txt",
          "file.txt");
@end example

GET and POST requests can be specified by @var{method} and @var{param}.
The parameter @var{method} is either @samp{get} or @samp{post}
and @var{param} is a cell array of parameter and value pairs.
For example:

@example
urlwrite ("http://www.google.com/search", "search.html",
          "get", @{"query", "octave"@});
@end example
@seealso{urlread}
@end deftypefn
urlread
-*- texinfo -*-
@deftypefn {Loadable Function} {@var{s} =} urlread (@var{url})
@deftypefnx {Loadable Function} {[@var{s}, @var{success}] =} urlread (@var{url})
@deftypefnx {Loadable Function} {[@var{s}, @var{success}, @var{message}] =} urlread (@var{url})
@deftypefnx {Loadable Function} {[@dots{}] =} urlread (@var{url}, @var{method}, @var{param})
Download a remote file specified by its @var{URL} and return its content
in string @var{s}.  For example,

@example
s = urlread ("ftp://ftp.octave.org/pub/octave/README");
@end example

The variable @var{success} is 1 if the download was successful,
otherwise it is 0 in which case @var{message} contains an error
message.  If no output argument is specified and if an error occurs,
then the error is signaled through Octave's error handling mechanism.

This function uses libcurl.  Curl supports, among others, the HTTP,
FTP and FILE protocols.  Username and password may be specified in the
URL.  For example,

@example
s = urlread ("http://username:password@@example.com/file.txt");
@end example

GET and POST requests can be specified by @var{method} and @var{param}.
The parameter @var{method} is either @samp{get} or @samp{post}
and @var{param} is a cell array of parameter and value pairs.
For example,

@example
s = urlread ("http://www.google.com/search", "get",
             @{"query", "octave"@});
@end example
@seealso{urlwrite}
@end deftypefn
isvarname
-*- texinfo -*-
@deftypefn {Built-in Function} {} isvarname (@var{name})
Return true if @var{name} is a valid variable name
@end deftypefn
file_in_loadpath
-*- texinfo -*-
@deftypefn {Built-in Function} {} file_in_loadpath (@var{file})
@deftypefnx {Built-in Function} {} file_in_loadpath (@var{file}, "all")

Return the absolute name of @var{file} if it can be found in
the list of directories specified by @code{path}.
If no file is found, return an empty matrix.

If the first argument is a cell array of strings, search each
directory of the loadpath for element of the cell array and return
the first that matches.

If the second optional argument @code{"all"} is supplied, return
a cell array containing the list of all files that have the same
name in the path.  If no files are found, return an empty cell array.
@seealso{file_in_path, path}
@end deftypefn
file_in_path
-*- texinfo -*-
@deftypefn {Built-in Function} {} file_in_path (@var{path}, @var{file})
@deftypefnx {Built-in Function} {} file_in_path (@var{path}, @var{file}, "all")
Return the absolute name of @var{file} if it can be found in
@var{path}.  The value of @var{path} should be a colon-separated list of
directories in the format described for @code{path}.  If no file
is found, return an empty matrix.  For example,

@example
file_in_path (EXEC_PATH, "sh")
     @result{} "/bin/sh"
@end example

If the second argument is a cell array of strings, search each
directory of the path for element of the cell array and return
the first that matches.

If the third optional argument @code{"all"} is supplied, return
a cell array containing the list of all files that have the same
name in the path.  If no files are found, return an empty cell array.
@seealso{file_in_loadpath}
@end deftypefn
do_string_escapes
-*- texinfo -*-
@deftypefn {Built-in Function} {} do_string_escapes (@var{string})
Convert special characters in @var{string} to their escaped forms.
@end deftypefn
undo_string_escapes
-*- texinfo -*-
@deftypefn {Built-in Function} {} undo_string_escapes (@var{s})
Converts special characters in strings back to their escaped forms.  For
example, the expression

@example
bell = "\a";
@end example

@noindent
assigns the value of the alert character (control-g, ASCII code 7) to
the string variable @code{bell}.  If this string is printed, the
system will ring the terminal bell (if it is possible).  This is
normally the desired outcome.  However, sometimes it is useful to be
able to print the original representation of the string, with the
special characters replaced by their escape sequences.  For example,

@example
octave:13> undo_string_escapes (bell)
ans = \a
@end example

@noindent
replaces the unprintable alert character with its printable
representation.
@end deftypefn
errno
-*- texinfo -*-
@deftypefn {Built-in Function} {@var{err} =} errno ()
@deftypefnx {Built-in Function} {@var{err} =} errno (@var{val})
@deftypefnx {Built-in Function} {@var{err} =} errno (@var{name})
Return the current value of the system-dependent variable errno,
set its value to @var{val} and return the previous value, or return
the named error code given @var{name} as a character string, or -1
if @var{name} is not found.
@end deftypefn
errno_list
-*- texinfo -*-
@deftypefn {Built-in Function} {} errno_list ()
Return a structure containing the system-dependent errno values.
@end deftypefn
mark_as_command
-*- texinfo -*-
@deftypefn {Built-in Function} {} mark_as_command (@var{name})
Enter @var{name} into the list of commands.
@seealso{unmark_command, iscommand}
@end deftypefn
unmark_command
-*- texinfo -*-
@deftypefn {Built-in Function} {} unmark_command (@var{name})
Remove @var{name} from the list of commands.
@seealso{mark_as_command, iscommand}
@end deftypefn
iscommand
-*- texinfo -*-
@deftypefn {Built-in Function} {} iscommand (@var{name})
Return true if @var{name} is a command style function.  If @var{name}
is omitted, return a list of identifiers which are marked as commands with
@code{mark_as_command}.
@seealso{mark_as_command, unmark_command}
@end deftypefn
mark_as_rawcommand
-*- texinfo -*-
@deftypefn {Built-in Function} {} mark_as_rawcommand (@var{name})
Enter @var{name} into the list of raw input commands and to the list of
command style functions.
Raw input commands are like normal command style functions, but they
receive their input unprocessed (ie. strings still contain the quotes
and escapes they had when input). However, comments and continuations
are handled as usual, you cannot pass a token starting with a comment
character ('#' or '%') to your function, and the last token cannot be
a continuation token ('\' or '...').
@seealso{unmark_rawcommand, israwcommand, iscommand, mark_as_command}
@end deftypefn
unmark_rawcommand
-*- texinfo -*-
@deftypefn {Built-in Function} {} unmark_rawcommand (@var{name})
Remove @var{name} from the list of raw input commands.
Note that this does not remove @var{name} from the list of command style
functions.
@seealso{mark_as_rawcommand, israwcommand, iscommand, unmark_command}
@end deftypefn
israwcommand
-*- texinfo -*-
@deftypefn {Built-in Function} {} israwcommand (@var{name})
Return true if @var{name} is a raw input command function.
If @var{name} is omitted, return a list of identifiers which are marked as
raw input commands with mark_as_rawcommand.
@seealso{mark_as_rawcommand, unmark_rawcommand}
@end deftypefn
isglobal
-*- texinfo -*-
@deftypefn {Built-in Function} {} isglobal (@var{name})
Return 1 if @var{name} is globally visible.  Otherwise, return 0.  For
example,

@example
@group
global x
isglobal ("x")
     @result{} 1
@end group
@end example
@end deftypefn
is_global
-*- texinfo -*-
@deftypefn {Built-in Function} {} isglobal (@var{name})
This function has been deprecated.  Use isglobal instead.
@end deftypefn
exist
-*- texinfo -*-
@deftypefn {Built-in Function} {} exist (@var{name}, @var{type})
Return 1 if the name exists as a variable, 2 if the name (after
appending @samp{.m}) is a function file in Octave's @code{path}, 3 if the
name is a @samp{.oct} or @samp{.mex} file in Octave's @code{path},
5 if the name is a built-in function, 7 if the name is a directory, or 103
if the name is a function not associated with a file (entered on
the command line).

Otherwise, return 0.

This function also returns 2 if a regular file called @var{name}
exists in Octave's search path.  If you want information about
other types of files, you should use some combination of the functions
@code{file_in_path} and @code{stat} instead.

If the optional argument @var{type} is supplied, check only for
symbols of the specified type.  Valid types are

@table @samp
@item "var"
Check only for variables.
@item "builtin"
Check only for built-in functions.
@item "file"
Check only for files.
@item "dir"
Check only for directories.
@end table
@end deftypefn
document
-*- texinfo -*-
@deftypefn {Built-in Function} {} document (@var{symbol}, @var{text})
Set the documentation string for @var{symbol} to @var{text}.
@end deftypefn
who
-*- texinfo -*-
@deffn {Command} who options pattern @dots{}
@deffnx {Command} whos options pattern @dots{}
List currently defined symbols matching the given patterns.  The
following are valid options.  They may be shortened to one character but
may not be combined.

@table @code
@item -all
List all currently defined symbols.

@item -builtins
List built-in functions.  This includes all currently
compiled function files, but does not include all function files that
are in the search path.

@item -functions
List user-defined functions.

@item -long
Print a long listing including the type and dimensions of any symbols.
The symbols in the first column of output indicate whether it is
possible to redefine the symbol, and whether it is possible for it to be
cleared.

@item -variables
List user-defined variables.
@end table

Valid patterns are the same as described for the @code{clear} command
above.  If no patterns are supplied, all symbols from the given category
are listed.  By default, only user defined functions and variables
visible in the local scope are displayed.

The command @kbd{whos} is equivalent to @kbd{who -long}.
@end deffn
whos
-*- texinfo -*-
@deffn {Command} whos options pattern @dots{}
See who.
@end deffn
mlock
-*- texinfo -*-
@deftypefn {Built-in Function} {} mlock (@var{name})
Lock the named function into memory.  If no function is named
then lock in the current function.
@seealso{munlock, mislocked, persistent}
@end deftypefn
munlock
-*- texinfo -*-
@deftypefn {Built-in Function} {} munlock (@var{fcn})
Unlock the named function.  If no function is named
then unlock the current function.
@seealso{mlock, mislocked, persistent}
@end deftypefn
mislocked
-*- texinfo -*-
@deftypefn {Built-in Function} {} mislocked (@var{fcn})
Return true if the named function is locked.  If no function is named
then return true if the current function is locked.
@seealso{mlock, munlock, persistent}
@end deftypefn
clear
-*- texinfo -*-
@deffn {Command} clear [-x] pattern @dots{}
Delete the names matching the given patterns from the symbol table.  The
pattern may contain the following special characters:

@table @code
@item ?
Match any single character.

@item *
Match zero or more characters.

@item [ @var{list} ]
Match the list of characters specified by @var{list}.  If the first
character is @code{!} or @code{^}, match all characters except those
specified by @var{list}.  For example, the pattern @samp{[a-zA-Z]} will
match all lower and upper case alphabetic characters.
@end table

For example, the command

@example
clear foo b*r
@end example

@noindent
clears the name @code{foo} and all names that begin with the letter
@code{b} and end with the letter @code{r}.

If @code{clear} is called without any arguments, all user-defined
variables (local and global) are cleared from the symbol table.  If
@code{clear} is called with at least one argument, only the visible
names matching the arguments are cleared.  For example, suppose you have
defined a function @code{foo}, and then hidden it by performing the
assignment @code{foo = 2}.  Executing the command @kbd{clear foo} once
will clear the variable definition and restore the definition of
@code{foo} as a function.  Executing @kbd{clear foo} a second time will
clear the function definition.

With -x, clear the variables that don't match the patterns.
@end deffn
__print_symtab_info__
-*- texinfo -*-
@deftypefn {Built-in Function} {} __print_symtab_info__ ()
Print raw symbol table statistices.
@end deftypefn
__print_symbol_info__
-*- texinfo -*-
@deftypefn {Built-in Function} {} __dump_symbol_info__ (@var{name})
Print symbol table information for the symbol @var{name}.
@end deftypefn
ignore_function_time_stamp
-*- texinfo -*-
@deftypefn {Built-in Function} {@var{val} =} ignore_function_time_stamp ()
@deftypefnx {Built-in Function} {@var{old_val} =} ignore_function_time_stamp (@var{new_val})
Query or set the internal variable that controls whether Octave checks
the time stamp on files each time it looks up functions defined in
function files.  If the internal variable is set to @code{"system"},
Octave will not automatically recompile function files in subdirectories of
@file{@var{octave-home}/lib/@var{version}} if they have changed since
they were last compiled, but will recompile other function files in the
search path if they change.  If set to @code{"all"}, Octave will not
recompile any function files unless their definitions are removed with
@code{clear}.  If set to "none", Octave will always check time stamps
on files to determine whether functions defined in function files
need to recompiled.
@end deftypefn
