MATLAB: Shade the area under a anonymous function

areafunction

Im trying to visualize the area between my anonymous function and the x-axle but can't find a way of doing so.
Does someone have a method for this?

Best Answer

f=@(x) sin(1-x.^3)
x=0:0.001:2*pi;
area(x,f(x))