This worked wonders for me in MATLAB 2014a, but it is currently returning the following error with MATLAB 2014b:
Undefined function 'abs' for input arguments of type 'matlab.ui.Figure'.
Error in num2str (line 66)
xmax = double(max(abs(widthCopy(:))));
Error in maximize (line 137)
windowname = ['maximize_',num2str(h(n))];
11 Jan 2014
Platform independent function to maximize a figure window.
Thanks Mathworks, for automatically submitting my rating without allowing me to write a comment first.
Works with Matlab 2013b, but it generates null pointer exceptions when the figure's property 'Visible' is set to off.