Generate diagram in linear scale
3 次查看(过去 30 天)
显示 更早的评论
I defined a polynomia;
P = [1 10 -13 -118 120]
I want to generate a diagram in linear scale of that polynomial in range from -100 to 100
How can I do it?
0 个评论
采纳的回答
Abderrahim. B
2022-8-30
Hi!
See these 2 methods:
P = [1 10 -13 -118 120] ;
Method 1:
figure
plot(-100:100, polyval(P, -100:100))
Method 2:
myPoly = @(p)P(1)*p.^4 + P(2)*p.^3 -P(3)*p.^2 -P(4)*p.^1 + P(5) ;
plot(-100:100, myPoly(-100:100))
0 个评论
更多回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Polynomials 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!