plot a quadratic equation

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 日

1 投票

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 日

0 投票

x=(1:0.5:10);
f=(x.^2+5*x+6);
plot(x,f);

カテゴリ

ヘルプ センター および File ExchangeMathematics についてさらに検索

質問済み:

2016 年 2 月 29 日

編集済み:

2024 年 7 月 29 日

Community Treasure Hunt

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

Start Hunting!

Translated by