MATLAB: Size of figure inner box

figure

Hi all I have two figures which I want to have the same figure size To set the same figure size it's easy using set(gcf,'position')
my problem is that in one of the figures ylabel has two lines thus it decrease the size of the inner box of the figure. how can i set the tw0 figures to have the same inner box size?
P.S. Is it possible to set the location of ylabel corresponding to the axis?
Thank! Guy

Best Answer

Example
close all
y1=sin(1:100),
y2=cos(1:100)
plot(y1)
ax1=gca
figure
plot(y2)
ax2=gca
pos=get(ax1,'position')
set(ax2,'position',pos)