uneven number of subplots in columns
31 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Morgan Clendennin
el 10 de Dic. de 2017
Respondida: Star Strider
el 10 de Dic. de 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 comentarios
Respuesta aceptada
Star Strider
el 10 de Dic. de 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 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Subplots en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!