MATLAB: How to make figure window and command window apear top to bottom

plot figure window command position

Ok so I want make it so went I plot my figure that it appears on top half of the screen but at the same time make it so the command window appears at the bottom half of the screen when I run the script. How would I do this? Thanks.

Best Answer

Click and drag the command window to where you want it. Then after you plot your figure, use this:
% Enlarge figure to top half of the screen.
set(gcf, 'Units', 'Normalized', 'OuterPosition', [0 0.5 1 0.5]);