Why can't i plot this equation?

f=@(x)((1+x.^2-1.5*x.^3+0.5*x.^4)/(1+x.^4));
x=linspace(-25,25);
plot(x,f(x))
grid on

 Accepted Answer

James Tursa
James Tursa on 7 Nov 2016
Edited: James Tursa on 7 Nov 2016
Use element-wise divide operator ./ instead of matrix divide operator /
f=@(x)((1+x.^2-1.5*x.^3+0.5*x.^4)./(1+x.^4))

More Answers (0)

Categories

Find more on Labels and Styling in Help Center and File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!