| Products & Services | Industries | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → MATLAB |
| Contents | Index |
| Learn more about MATLAB |
triplequad(fun,xmin,xmax,ymin,ymax,zmin,zmax)
triplequad(fun,xmin,xmax,ymin,ymax,zmin,zmax,tol)
triplequad(fun,xmin,xmax,ymin,ymax,zmin,zmax,tol,method)
triplequad(fun,xmin,xmax,ymin,ymax,zmin,zmax) evaluates the triple integral fun(x,y,z) over the three dimensional rectangular region xmin <= x <= xmax, ymin <= y <= ymax, zmin <= z <= zmax. fun is a function handle. See Function Handles in the MATLAB Programming documentation for more information.fun(x,y,z) must accept a vector x and scalars y and z, and return a vector of values of the integrand.
Parametrizing Functions, in the MATLAB Mathematics documentation, explains how to provide additional parameters to the function fun, if necessary.
triplequad(fun,xmin,xmax,ymin,ymax,zmin,zmax,tol) uses a tolerance tol instead of the default, which is 1.0e-6.
triplequad(fun,xmin,xmax,ymin,ymax,zmin,zmax,tol,method) uses the quadrature function specified as method, instead of the default quad. Valid values for method are @quadl or the function handle of a user-defined quadrature method that has the same calling sequence as quad and quadl.
Pass M-file function handle @integrnd to triplequad:P
Q = triplequad(@integrnd,0,pi,0,1,-1,1);
where the M-file integrnd.m is
function f = integrnd(x,y,z) f = y*sin(x)+z*cos(x);
Pass anonymous function handle F to triplequad:
F = @(x,y,z)y*sin(x)+z*cos(x); Q = triplequad(F,0,pi,0,1,-1,1);
This example integrates y*sin(x)+z*cos(x) over the region 0 <= x <= pi, 0 <= y <= 1, -1 <= z <= 1. Note that the integrand can be evaluated with a vector x and scalars y and z.
dblquad, quad2d, quad, quadgk, quadl, function handle (@), Anonymous Functions
![]() | trimesh | triplot | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |