q = integral3(fun, xmin, xmax, ymin, ymax, zmin, zmax)
q = integral3(fun, xmin, xmax, ymin, ymax, zmin, zmax, name, value)
| Parameter | Description |
|---|---|
| fun | Integrand: function handle of x, y, and z. |
| xmin, xmax | Limits of integration in x. |
| ymin, ymax | Limits in y: scalars or function handles of x. |
| zmin, zmax | Limits in z: scalars or function handles of x and y. |
| name, value | Options: 'RelativeTolerance' (default 1e-6), 'AbsoluteTolerance' (default 1e-10), 'Method', 'Vectorized', and 'Waypoints'. The former names 'RelTol' and 'AbsTol' are still accepted. |
| Parameter | Description |
|---|---|
| q | Computed triple integral. |
integral3 evaluates a triple integral over a rectangular or function-bounded region.
Finite vectorized calls use a tiled Gauss-Kronrod rule. Infinite limits and Method set to 'iterated' use nested adaptive quadrature.
Waypoints specifies points of interest of the integration region, such as local extrema or discontinuities, that the integrator uses in its initial mesh: a three-column array [x y z] of points, or a cell array {x y z} of grid vectors. The x, y and z intervals are split at the corresponding coordinates of the waypoints. Waypoints must be real and finite. Do not use waypoints to specify singularities; split the region instead.
q = integral3(@(x, y, z) y .* sin(x) + z .* cos(x), 0, pi, 0, 1, -1, 1)
fun = @(x, y, z) abs(x - 0.3) .* abs(y - 0.6) .* abs(z - 0.2);
q = integral3(fun, 0, 1, 0, 1, 0, 1, 'Waypoints', [0.3, 0.6, 0.2])
| Version | Description |
|---|---|
| 2.0.0 | initial version |
| 2.0.0 | 'AbsoluteTolerance' and 'RelativeTolerance' names added ('AbsTol' and 'RelTol' still accepted). |
| 2.0.0 | 'Waypoints' option added: points of interest in the integration region. |