在MatLab中更改绘图的窗口大小

在MatLab中更改绘图的窗口大小,matlab,graph,window,size,Matlab,Graph,Window,Size,我已经绘制了一个图形,我需要更改绘图窗口的窗口大小。请帮忙 x=0:0.1:3; for i = 1:4 y0=[-0.05;-0.1;0.05;0.1]; y=y0(i,1)*exp(-2*x); plot(x,y) hold all end 在循环之前,创建一个图形并将位置设置为[startX,startY,width,height] x=0:0.1:3; figure('Position',[100 100 500 500]); for i = 1:4 y0=[-0.

我已经绘制了一个图形,我需要更改绘图窗口的窗口大小。请帮忙

x=0:0.1:3;

for i = 1:4
    y0=[-0.05;-0.1;0.05;0.1];

y=y0(i,1)*exp(-2*x);
plot(x,y)
hold all
end

在循环之前,创建一个图形并将位置设置为[startX,startY,width,height]

x=0:0.1:3;
figure('Position',[100 100 500 500]);
for i = 1:4
    y0=[-0.05;-0.1;0.05;0.1];
    y=y0(i,1)*exp(-2*x);
    plot(x,y)
    hold all
end
或者,在原始代码之后,运行

f = gcf;
f.Position = [100 100 500 500]