在群集上完成了几次模拟,每个模拟都保存了一个图形,我想将这些图形组合成一个图形。将数字与子图组合到一个图中
为了方便,假设我们有两个数字:
x = 0:0.01:.2;
subplot(1,3,1)
plot(x,sin(x))
legend('sin(x)')
subplot(1,3,2)
plot(x,cos(x))
legend('cos(x)')
subplot(1,3,3)
plot(x,tan(x))
legend('tan(x)')
和
x = 0:0.01:.2;
subplot(1,3,1)
plot(x,x,'r')
legend('x')
subplot(1,3,2)
plot(x,1-x.^2/2,'r')
legend('1-x.^2/2')
subplot(1,3,3)
plot(x,x,'r')
legend('x')
保存为figure1.fig
和figure2.fig
。我现在想要将这两幅地块合并成一幅带有三幅小插图的图,这两幅图的颜色和传说都是一样的。是否有捷径可寻?