在matlab中如何在不同的框架下绘图
在我的程序中,我想得到三个情节在matlab中如何在不同的框架下绘图,matlab,Matlab,在我的程序中,我想得到三个情节 plot(CumulativeReward) title('Cumulative Reward, gamma=1'); xlabel('episode number'); ylabel('CumulativeReward') plot(Pathlength) title('pathlength as a function of episode number'); xlabel('episode number'); ylabel('pathlength') x
plot(CumulativeReward)
title('Cumulative Reward, gamma=1');
xlabel('episode number');
ylabel('CumulativeReward')
plot(Pathlength)
title('pathlength as a function of episode number');
xlabel('episode number');
ylabel('pathlength')
x = -pi:.1:pi;
y = sin(x);
plot(x,y)
但是所有三个绘图都在一个框架中,如何将每个绘图放在不同的框架框中?在调用
绘图之前调用图。这将打开一个新的地物窗口
例如,为了更容易区分窗口,您可以设置它们的标题
figure('name','Cumulative Reward')
如果要并排打印,可以使用子地块
,即
subplot(1,3,1)
%# your first plot here
subplot(1,3,2)
%# your second plot here
subplot(1,3,3)
#% your third plot here