Display warning message
warning(
displays
the warning message and sets the warning state for themsg
)lastwarn
function.
If msg
is an empty character vector (''
), warning
resets
the warning state for lastwarn
, but does not
display any text.
warning(
attaches
a warning identifier to the warning message. You can include any of
the input arguments in the previous syntaxes. The identifier enables
you to distinguish warnings and to control what happens when MATLAB encounters
the warnings.msgID
,___)
warning
displays the state of all of the
warnings. It is equivalent to warning('query')
.
warnStruct = warning
returns a structure
or array of structures that contains information about which warnings
are enabled and disabled. warnStruct
includes an identifier
field
with a msgID
or 'all'
, and a state
field
that indicates the state of the corresponding warning.
warning(
sets the current warning settings as indicated in the structure array, warnStruct
)warnStruct
.
warnStruct = warning(
returns
a structure with an state
,mode
)identifier
field containing
the mode
and a state
field containing
the current state of mode
. If you pass the output
structure, warnStruct
, into the warning
function,
you set the state of the mode
, not which warnings
are enabled or disabled.