I have plotted a graph and I need to change the window size of the plot window. Please help.
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
Before your loop, create a figure and set the position as [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
Alternatively, after your original code, run
f = gcf;
f.Position = [100 100 500 500]