plot a quadratic equation

조회 수: 73 (최근 30일)
Anvinder  Singh
Anvinder Singh 2016년 2월 29일
편집: Walter Roberson 2024년 7월 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에서 Mathematics에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by