📄 sizefig.m
字号:
function pos = sizefig(dx,dy)% FIGSIZE determine the figure size for the current screen resolution%% SIZES = SIZEFIG(DX,DY)% DX = normalized width for a 1024x768 screen% DY = normalized hight for a 1024x768 screen% POS = resulting figure normalized position [x y dx dy]%%Author: Federico Milano%Date: 22-Sep-2003%Version: 1.0.0%%E-mail: fmilano@thunderbox.uwaterloo.ca%Web-site: http://thunderbox.uwaterloo.ca/~fmilano%% Copyright (C) 2002-2005 Federico Milano%% This toolbox is free software; you can redistribute it and/or modify% it under the terms of the GNU General Public License as published by% the Free Software Foundation; either version 2.0 of the License, or% (at your option) any later version.%% This toolbox is distributed in the hope that it will be useful, but% WITHOUT ANY WARRANTY; without even the implied warranty of% MERCHANDABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU% General Public License for more details.%% You should have received a copy of the GNU General Public License% along with this toolbox; if not, write to the Free Software% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307,% USA.if ~strcmp(get(0,'Units'),'pixels') set(0,'Units','pixels')end% get screen sizescrnsize = get(0,'ScreenSize');screenx = scrnsize(3);screeny = scrnsize(4);screenr = screeny/screenx;% check screen ratio% standard screen ratio 768/1024 = 0.75if screenr > 0.75 screeny = screenx*screenr;elseif screenr < 0.75 screenx = screeny/screenr;end% changes apply only if the screen resolution is higher than% 1024x768if screenx > 1024 | screeny > 768 dx = 1024*dx/screenx; dy = 768*dy/screeny;end% output window positionpos = [(1-dx)*0.5, (1-dy)*0.5, dx, dy];
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -