I have a question regarding double integration in MATLAB. I have three variables x, y, and z in the function I want to integrate, but want to integrate on x and y only. I am expecting the resulting equation to be a function of z, which may be more like a simplify function.
>> fun =@(x,y,z) 1/4.*max(x-(1+z)*y, 0); >> integral_fun = quad2d(fun,0,2,0,2) ??? Input argument "z" is undefined.
Error in ==> @(x,y,z)1/4.*max(x-(1+z)*y,0)
Error in ==> quad2d>tensor at 355 Z = FUN(X,Y); NFE = NFE + 1;
Error in ==> quad2d at 169 [Qsub,esub] = tensor(thetaL,thetaR,phiB,phiT);
Please help me out. Thank you.
Best Answer