Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get current figure size in MATLAB

Simple question: How do you get the current figure size in MATLAB?

Example:

figure(1)
[width, height] = ****some function I'm not aware of****

Googling this always returns how to change the window size but not how to just get the current window size.

Any help is appreciated.

Cheers

like image 884
Darcy Avatar asked Sep 22 '15 20:09

Darcy


1 Answers

pos = get(gcf, 'Position'); %// gives x left, y bottom, width, height
width = pos(3);
height = pos(4);
like image 121
Luis Mendo Avatar answered Sep 20 '22 22:09

Luis Mendo