myerror.m

来自「matlab源代码」· M 代码 · 共 24 行

M
24
字号
function myerror(message)
% Generalization of Matlabs error message for compiled code
% S4M.compiled == 0   same as standard error message
% S4M.compiled == 1   Error message is displayed in dialog window and global
% variable ABORTED is set to logical(1).
% Written by: E. R.: January 25, 2004
% Last updated: May 5, 2005: Message window displayed also if S4M.interactive is true
%
%           myerror(message)
% INPUT
% message   string with error message to display

global S4M ABORTED

if S4M.compiled  |  S4M.interactive
   disp(message)
   myerrordlg(message)
   ABORTED=logical(1);

else
   error(message)
end

⌨️ 快捷键说明

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