Mercurial > hg > octave-lyh
view doc/interpreter/quad.texi @ 2449:31d5588dbb61
[project @ 1996-10-30 22:58:44 by jwe]
author | jwe |
---|---|
date | Wed, 30 Oct 1996 23:00:41 +0000 |
parents | b1a56412c385 |
children | 7ee42ff6536a |
line wrap: on
line source
@c Copyright (C) 1996 John W. Eaton @c This is part of the Octave manual. @c For copying conditions, see the file gpl.texi. @node Quadrature, Control Theory, Optimization, Top @chapter Quadrature @menu * Functions of one Variable:: * Orthogonal Collocation:: @end menu @node Functions of one Variable, Orthogonal Collocation, Quadrature, Quadrature @section Functions of one Variable @deftypefn {Built-in Function} {[@var{v}, @var{ier}, @var{nfun}] =} 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 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. @end deftypefn @deftypefn {Built-in 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. @end deftypefn @node Orthogonal Collocation, , Functions of one Variable, Quadrature @section Orthogonal Collocation @deftypefn {Built-in Function} {[@var{r}, @var{A}, @var{B}, @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