alexerror.m

来自「matlab处理图像的一些基本方法。其中有一部分mex程序需要安装编译」· M 代码 · 共 66 行

M
66
字号
function alexerror(msg)%ALEXERROR Open an error dialog box%% Copyright (c) 1995 by Claudio Rivetti and Mark Young% claudio@alice.uoregon.edu,    mark@alice.uoregon.edu%global Uibgcolor ss ede qqqq=0;ss=msg;if isempty(Uibgcolor)  Uibgcolor=[.55 .55 .55];endpos=[0 0 0 0];c=screencenter;pos(1)=c(1)-200;pos(2)=c(2)-90;pos(3)=400;pos(4)=180;ef=figure('name', 'Error',...	'Resize', 'off',...	'NumberTitle', 'off',...	'Position', pos,...	'Color', Uibgcolor);ede=uicontrol('style', 'edit',...		'units', 'normalized',...		'pos', [0.03 0.45 0.94 0.5],...		'min', 1,...		'max', 10,...		'backgr', 'r',...		'fore', 'y',...		'horiz', 'center',...		'string', msg,...		'Callback', 'global ede ss;set(ede, ''string'', ss);');uicontrol('style', 'frame',...		'units', 'normalized',...		'pos', [0.03 0.05 0.94 0.35],...		'background', Uibgcolor);okb=uicontrol('style', 'push',...		'units', 'normalized',...		'pos', [0.4 0.1 0.2 0.2],...		'horiz', 'center',...		'string', 'Ok',...		'Callback', 'global qq;qq=1;');fprintf('%c', 7);while qq==0  if ~figflag('Error', 0);    return;  endendclose(ef);return;

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?