uneven number of subplots in columns
31 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Morgan Clendennin
le 10 Déc 2017
Réponse apportée : Star Strider
le 10 Déc 2017
Hi,
I'm not sure if the title of this question makes any sense so I'm going to try and explain it here. Let's say that I have three equations, A = 2x, B = x^2, and C = B - A. I want to create a subplot that shows all three functions plotted however, I don't want 1 column and 3 rows or 1 row and 3 columns. I want to do a 2 column subplot with A and B on separate rows in the first column and the second column contains equation C. The only way that I can see to do it is to do a 2 x 2 subplot but this isn't what I want. I want equation C to encompass all of the second column. I'm open to suggestions on how to do this and I hope this makes sense.
0 commentaires
Réponse acceptée
Star Strider
le 10 Déc 2017
Try this:
x = rand(1, 10);
A = 2*x;
B = x.^2;
C = B - A;
figure(1)
subplot(2,2,1)
plot(A)
title('A')
subplot(2,2,3)
plot(B)
title('B')
subplot(2,2,[2 4])
plot(C)
title('C')
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Subplots 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!