h1=figure(1);
plot(t,y)
set(h1,'Position',[10 10 500 500])
f1 = figure();
% plot what ever you want!
% then put code below.
set(f1, 'Position', [10 10 width height]);
% width -> Distance between the right and left inner edges of the figure.
% height -> Distance between the top and bottom inner edges of the window.