setwinsize(handle,x,y) Set the size of a window without moving the top left corner eg: setwinsize(gcf,1000,500)
0001 function setwinsize(winhandle,x,y) 0002 % setwinsize(handle,x,y) 0003 % 0004 % Set the size of a window without moving the top left corner 0005 % 0006 % eg: setwinsize(gcf,1000,500) 0007 0008 p=get(winhandle,'Position'); 0009 top=p(2)+p(4); 0010 p(3)=x; 0011 p(4)=y; 0012 p(2)=top-p(4); 0013 set(winhandle,'Position',p);