plot a quadratic equation

80 vues (au cours des 30 derniers jours)
Anvinder  Singh
Anvinder Singh le 29 Fév 2016
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 commentaire
Umar
Umar le 29 Juil 2024
Modifié(e) : Umar le 29 Juil 2024

Hi @Anvinder Singh,

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

Connectez-vous pour commenter.

Réponses (2)

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

MUSISI
MUSISI le 11 Avr 2024
Modifié(e) : Walter Roberson le 29 Juil 2024
x=(1:0.5:10);
f=(x.^2+5*x+6);
plot(x,f);

Catégories

En savoir plus sur Mathematics dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by