在 MATLAB 中获取当前图形大小
Get current figure size in MATLAB
简单问题:如何在MATLAB中获取当前图形大小?
示例:
figure(1)
[width, height] = ****some function I'm not aware of****
总是在谷歌上搜索 returns 如何 更改 window 大小而不是如何获得当前 window 尺寸。
感谢任何帮助。
干杯
pos = get(gcf, 'Position'); %// gives x left, y bottom, width, height
width = pos(3);
height = pos(4);
简单问题:如何在MATLAB中获取当前图形大小?
示例:
figure(1)
[width, height] = ****some function I'm not aware of****
总是在谷歌上搜索 returns 如何 更改 window 大小而不是如何获得当前 window 尺寸。
感谢任何帮助。
干杯
pos = get(gcf, 'Position'); %// gives x left, y bottom, width, height
width = pos(3);
height = pos(4);