www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/TripleIntegralwithFiniteLimitsExample.m

    %% Triple Integral with Finite Limits  

%% 
% Define the anonymous function $f(x,y,z) = y \sin x + z \cos x$. 
fun = @(x,y,z) y.*sin(x)+z.*cos(x)  

%% 
% Integrate over the region $0 \le x \le \pi$, $0 \le y \le 1$, and $-1 \le
% z \le 1$.
q = integral3(fun,0,pi,0,1,-1,1)