MATLAB: How to explain that integral(sqrt,0.5,1) does not work

functioninput argumentintegral

but
fun=@(x) sqrt(x);
integral(fun,0.5,1)
does?

Best Answer

Hi YZ,
try
integral(@sqrt,.5,1)
It's syntax ...