MATLAB: Not enough input arguments

integralnot enough input arguments

The live script is attached, but the code is as follows:
fplot(f,[-1 4])
grid on
title('y=x^3-4*x^2+2*x-4')
xlabel('x');
ylabel('y');
hold on
f(3)-f(5)
Differentiation=diff(y, x)
Integtgral=integral(f,-1,4)
function y=f(x)
y=x^3-4*x^2+2*x-4
end
How do I fix the "not enough input arguments" error and also how do I get the integral to work?

Best Answer

integral(@f,-1,4)
% ^^ the first input needs to be a function handle!