Integrand, specified as a function handle, which defines the
function to be integrated from xmin
to xmax
.
For scalar-valued problems, the function y = fun(x)
must
accept a vector argument, x
, and return a vector
result, y
. This generally means that fun
must
use array operators instead of matrix operators. For example, use .*
(times)
rather than *
(mtimes). If you set the 'ArrayValued'
option
to true
, then fun
must accept
a scalar and return an array of fixed size.
Lower limit of x, specified as a real (finite
or infinite) scalar value or a complex (finite) scalar value. If either xmin
or xmax
are
complex, then integral
approximates the path
integral from xmin
to xmax
over
a straight line path.
Data Types: double
| single
Complex Number Support: Yes
Upper limit of x, specified as a real number
(finite or infinite) or a complex number (finite). If either xmin
or xmax
are
complex, integral
approximates the path integral
from xmin
to xmax
over a straight
line path.
Data Types: double
| single
Complex Number Support: Yes
Specify optional comma-separated pairs of Name,Value
arguments.
Name
is the argument
name and Value
is the corresponding
value. Name
must appear
inside single quotes (' '
).
You can specify several name and value pair
arguments in any order as Name1,Value1,...,NameN,ValueN
.
Example: 'AbsTol',1e-12
sets the absolute
error tolerance to approximately 12 decimal places of accuracy.
Absolute error tolerance, specified as the comma-separated pair
consisting of 'AbsTol'
and a nonnegative real number. integral
uses
the absolute error tolerance to limit an estimate of the absolute
error, |q – Q|, where q is
the computed value of the integral and Q is the
(unknown) exact value. integral
might provide
more decimal places of precision if you decrease the absolute error
tolerance. The default value is 1e-10
.
Note:
AbsTol and RelTol work
together. integral might satisfy the absolute
error tolerance or the relative error tolerance, but not necessarily
both. For more information on using these tolerances, see the Tips section. |
Example: 'AbsTol',1e-12
sets the absolute
error tolerance to approximately 12 decimal places of accuracy.
Data Types: single
| double
Relative error tolerance, specified as the comma-separated pair
consisting of 'RelTol'
and a nonnegative real number. integral
uses
the relative error tolerance to limit an estimate of the relative
error, |q – Q|/|Q|,
where q is the computed value of the integral and Q is
the (unknown) exact value. integral
might provide
more significant digits of precision if you decrease the relative
error tolerance. The default value is 1e-6
.
Note:
RelTol and AbsTol work
together. integral might satisfy the relative
error tolerance or the absolute error tolerance, but not necessarily
both. For more information on using these tolerances, see the Tips section. |
Example: 'RelTol',1e-9
sets the relative error
tolerance to approximately 9 significant digits.
Data Types: single
| double
Array-valued function flag, specified as the comma-separated
pair consisting of 'ArrayValued'
and either false
, true
, 0
,
or 1
. Set this flag to true
to
indicate that fun
is a function that accepts a
scalar input and returns a vector, matrix, or N-D array output.
The default value of 'false'
indicates that fun
is
a function that accepts a vector input and returns a vector output.
Example: 'ArrayValued',true
indicates that
the integrand is an array-valued function.
Integration waypoints, specified as the comma-separated pair
consisting of 'Waypoints'
and a vector of real
or complex numbers. Use waypoints to indicate any points in the integration
interval that you would like the integrator to use. You can use waypoints
to integrate efficiently across discontinuities of the integrand.
Specify the locations of the discontinuities in the vector you supply.
You can specify waypoints when you want to perform complex contour
integration. If xmin
, xmax
,
or any entry of the waypoints vector is complex, the integration is
performed over a sequence of straight line paths in the complex plane.
Example: 'Waypoints',[1+1i,1-1i]
specifies
two complex waypoints along the interval of integration.
Data Types: single
| double
Complex Number Support: Yes