Watch this Author's files
I encounter one issue using your maximize.m function, namely maximize throws exceptions when figure is not yet ready. I include an example:
Example that throws exceptions:
h = figure; maximize(h);
Not so nice looking solution:
h = figure; pause(0.01); maximize(h);
Exactly what I whas looking for. I always did resizing to fill the screen, but this works so much nicer.