Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/matlab/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在matlab中如何在不同的框架下绘图_Matlab - Fatal编程技术网

在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