www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/CreateMExceptionwithFormattedErrorMessageExample.m

    %% Create MException with Formatted Error Message  

% Copyright 2015 The MathWorks, Inc.


%%  
msgID = 'MATLAB:test';
msgtext = 'There are %d errors on this page';
A1 = 10;

ME = MException(msgID,msgtext,A1)