Using Simulink Previous page   Next Page

Creating Custom Simulation Error Messages

The Simulation Diagnostics Viewer displays the output of any instance of the MATLAB error function executed during a simulation, including instances invoked by block or model callbacks or S-functions that you create or that are executed by the MATLAB Fcn block. Thus, you can use the MATLAB error function in callbacks and S-functions or in the MATLAB Fcn block to create simulation error messages specific to your application.

For example, in the following model,

the MATLAB Fcn block invokes the following function:

Executing this model displays an error message in the Simulation Diagnostics Viewer.

Including Hyperlinks in Error Messages

You can include hyperlinks to blocks, text files, and directories.

To include a hyperlink to a block, path, or directory, include the item's path in the error message enclosed in quotation marks, e.g.,


Previous page  Diagnosing Simulation Errors Improving Simulation Performance and Accuracy Next page

© 1994-2005 The MathWorks, Inc.