This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Returning Warnings and Errors to the MATLAB Command Line

To return error or warning messages from your adaptor to the MATLAB® command line, use the adaptorError() and adaptorWarning() functions. These functions implement an interface similar to the MATLAB error and warning functions. Using these functions, you can display a text message at the MATLAB command line.

You must also include a message ID in your message using the format


where <component> and <mnemonic> are alphanumeric character vectors (for example, 'MATLAB:UndefinedFunction'). The identifier can be used to enable or disable display of the identified warning. For more information, type help warning or help error at the MATLAB command line.

The following example outputs a warning message to the MATLAB command line.