Documentation

This is machine translation

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

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan 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

<component>[:<component>]:<mnemonic> 

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.

imaqkit::adaptorWarn("MyDeviceAdaptor:constructor","In 
constructor");
Was this topic helpful?