Assume:
z = [0.4 0.5 0.75]'
function y = myfunct(x)
y = quad(@sin, 0, x)
I'd like to calculate the definite integral of sin(x) from 0 to 0.4, to 0.5, and 0.75, using:
myfunct(z)
However, Matlab returns:
??? Error using ==> quad at 70
The limits of integration must be scalars.
I'd be thankful for any constructive suggestions.