set(gcf,'Units','normalized', 'WindowStyle','docked','OuterPosition',[0 0 1 1]); will maximize the figure in a way that is analagous to hitting the 'maximize' button in windows.
03 Dec 2008
maximize
Maximize a figure window from the command line.
Author: Bill Finger