You need to evaluate the function in the plot call.
Example —
fun = @(x) x.^3 - 8*x.^2 + 10; x = linspace(-5, 5);
figure plot(x, fun(x)) grid
You need to evaluate the function in the plot call.
Example —
fun = @(x) x.^3 - 8*x.^2 + 10; x = linspace(-5, 5);
figure plot(x, fun(x)) grid
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!