This is machine translation

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

Error Handling

Generate, catch, and respond to warnings and errors

MATLAB Language Syntax

try, catch Execute statements and catch resulting errors


error Throw error and display message
warning Display warning message
lastwarn Last warning message
assert Throw error if condition false
onCleanup Cleanup tasks upon function completion
Was this topic helpful?