|
Contents | Previous | Next | Subchapters |
| Syntax |
int2inf(function fvec, low, eps) |
| See Also | gaussq , gaussleg |
+inf
/
| f(x) dx
/
low
where low is a real or
double-precision scalar.
Given a column vector xvec of length n
and with the same type as low,
the function fvec returns the column vector
/ \
| f(xvec ) |
| 1 |
| f(xvec ) |
| 2 |
| ... |
| f(xvec ) |
\ n /
The relative accuracy for the integral is specified by
eps which is a scalar with the same type as
low .
If the approximation converges,
the return value is a scalar with the same type as low.
Otherwise, the return value has type equal to "novalue".
clear
function fvec(xvec) begin
return exp(-xvec)
end
low = 0.
eps = 1e-5
int2inf(function fvec, low, eps)
O-Matrix will reply
1
which is equal to the integral of exp(-x) from zero
to infinity.
2
f(x) x --> 0 as x --> +infinity