plot a quadratic equation

271 次查看(过去 30 天)
Anvinder  Singh
Anvinder Singh 2016-2-29
I am to plot a quadratic equation and see how it looks . This is my code :
x=[-1:0.05:3];
f=(3*(x.^2))-(2*x);
plot(f)
xlim([-3 90]);
when i check online graphs fro this equation mine doesnt exactly match ?
  1 个评论
Umar
Umar 2024-7-29
编辑:Umar 2024-7-29

Hi @Anvinder Singh,

Please see my response to your posted question, “ when i check online graphs fro this equation mine doesnt exactly match ?”

请先登录,再进行评论。

回答(2 个)

Star Strider
Star Strider 2016-2-29
I don’t know what doesn’t ‘exactly match’, but perhaps changing your plot call to:
plot(x,f)
will help.

MUSISI
MUSISI 2024-4-11
编辑:Walter Roberson 2024-7-29
x=(1:0.5:10);
f=(x.^2+5*x+6);
plot(x,f);

类别

Help CenterFile Exchange 中查找有关 Polynomials 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by