uneven number of subplots in columns
33 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
Star Strider
2017-12-10
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 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Subplots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!