I want to evaluate the $\int\int\int dxdydz$ using 'integral3' function in MATLAB. But the only code my intuition has helped me it this:
g = @(x,y,z) 1
u = integral3(g,1,2,1,3,1,4)
But this results in errors. Please help me create the correct code.
integral3expects the functiongto be vectorized, however,g = @(x,y,z) 1will always return a scalar, no matter the dimensions of the inputx,y, orz.A simple fix:
Another example