Subplots in Matlab 2017
Afficher commentaires plus anciens
Hi Everyone,
Having struggles with using subplot function. I tried learning from the very basics and tried out this simple code I found on internet
x = 0:5;
y = sin(x);
z = log(y);
subplot(2,2,1);
plot(x,y);
subplot(2,2,3);
plot(y,z);
subplot(2,2,4);
plot(x,z);
but this is giving me a index exceeds matrix dimensions error. What could be wrong?
Réponses (1)
Walter Roberson
le 12 Juil 2017
1 vote
That code has problems with plotting imaginary values, but no problem with index exceeding matrix dimensions.
However, it is possible that you have previously made an assignment to a variable named "sin" or "log" or "subplot" or "plot"
Catégories
En savoir plus sur Subplots dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!