Graphing poly2sym([1 2 3])
7 views (last 30 days)
Show older comments
I've used this to try to graph, but it gives me an inaccurate graph. Attached is a picture of the graph that I'm getting, it shows (0,0) which must not be true for this function.
How could i graph this polynomial?
function test()
x=poly2sym([98 -280 235 -78 9]);
ezplot(x)
end
0 Comments
Answers (1)
Star Strider
on 22 Feb 2015
What’s ‘inaccurate’ about it? What polynomial are you presenting to it, and what do you expect? The polynomial it evaluates is:
f(x) = 98*x^4 - 280*x^3 + 235*x^2 - 78*x + 9
5 Comments
Andrew Newell
on 22 Feb 2015
Edited: Andrew Newell
on 22 Feb 2015
axis([0 2 -1 1])
clearly shows the roots, which you can get using
solve(x)
ans =
3/7
3/7
2^(1/2)/2 + 1
1 - 2^(1/2)/2
Note the double root at 3/7, which is why it just touches the axis.
See Also
Categories
Find more on Polynomials 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!