Create an m-script file to plot the following functions separately
4 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
KayLynn
il 27 Gen 2014
Commentato: Walter Roberson
il 28 Ago 2021
I am trying to plot the following function in Matlab. y=x^3+2x^2-6x with x having bounds of 0 to 30 (0:30)
I am using the following code and below is the error message I am receiving x=0:30; >> plot(x,'x.^3+2x.^2-6x'),grid Error using plot Error in color/linetype argument
If someone could please help me to fix this error and/or see the error in my function I would appreciate it.
0 Commenti
Risposta accettata
Azzi Abdelmalek
il 27 Gen 2014
Modificato: Azzi Abdelmalek
il 27 Gen 2014
x=0:30;
plot(x,x.^3+2*x.^2-6*x)
grid
xlabel('x')
ylabel('y')
title('y=x.^3+2*x.^2-6*x')
For more details look at
doc plot
Più risposte (1)
Vedere anche
Categorie
Scopri di più su Formatting and Annotation in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!