Matlab not plotting in -ve direction
Mostra commenti meno recenti
I am trying to normally plot y=x^3, but matlaab is not plotting in -ve direction
my code is
x=linspace(-10,10,100);
y=x.^3;
plot(y)

please help me
Risposte (1)
Steven Lord
il 20 Feb 2019
0 voti
- If Y is a vector, then the x-axis scale ranges from 1 to length(Y).
Instead you want:
- If X and Y are both vectors, then they must have equal length. The plot function plots Y versus X.
Categorie
Scopri di più su Annotations in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!