I want to plot F(x) and G(x) in same graph for x=(-10,10) how can I do this?
1 次查看(过去 30 天)
显示 更早的评论
f(x)=5x^2+9x+2
G(x)=3x+12
1 个评论
James Tursa
2018-2-22
编辑:James Tursa
2018-2-22
What have you done so far? What specific problems are you having with your code? Do you know how to evaluate polynomials for a vector input? Do you know how to plot?
回答(2 个)
Roger Stafford
2018-2-23
x = linspace(-10,10);
f = 5*x.^2+9*x+2;
G = 3*x+12;
plot(x,f,'r-',x,G,'g-')
2 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!