MATLAB: Drawing plot based on integration of multivariable

integrationplot

Want to draw a plot. Multi variable. For example,
x=e^t
f(x, y, z)=x+y^2+z^3
Integrate f with respect to y and z in some region(definite integral, for example (y,3,8) ,(z,2,7),let's say this result is F. then how can plot t vs F.
Matlab newbie and confused with variable, vector..

Best Answer

f = @(x,y,z) x + y.^2 + z.^3;
xt = @(t) exp(t);
t = linspace(0,10); %choose your t
x = xt(t); %compute x
F = zeros(size(t));
for K = 1 : length(t)
F(K) = integral2(@(y,z) f(x(K), y, z), 3, 8, 2, 7);
end
plot(t, F)