How to plot a line graph with algebraic function
2 views (last 30 days)
Show older comments
Mukri Ramli
on 30 Dec 2015
Answered: Walter Roberson
on 1 Jan 2016
i have this equation y = -3.546x^4 + 40.652x^3 - 172.24x^2 + 320.58x - 221.62 i dont know how to plot it all i can get is like a wave graph. i cant get it to be curved graph. please help me
2 Comments
Geoff Hayes
on 30 Dec 2015
Mukri - please clarify what you mean by I can't get it to be a curved graph. What values of x are you using? What is the code that you have written to plot the curve? Please attach an image of what you are observing (the wave) and what you wish to see (the curve).
Accepted Answer
Walter Roberson
on 1 Jan 2016
r = -3.546*Led.^4 + 40.652*Led.^3 - 172.24*Led.^2 + 320.58*Led - 221.62;
plot(Led, r)
0 Comments
More Answers (1)
dpb
on 30 Dec 2015
Try
ezplot('-3.546*x^4 + 40.652*x^3 - 172.24*x^2 + 320.58*x - 221.62') % let if default
ezplot('-3.546*x^4 + 40.652*x^3 - 172.24*x^2 + 320.58*x - 221.62',[-100 100]) % force wide range
and see if can't then tell over what range of independent variable you're interested.
1 Comment
See Also
Categories
Find more on MPSK in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!