%WARNING Display warning message; disable or enable warning messages.
%   WARNING(WARNMSG) displays the warning message WARNMSG, unless it has
%   been disabled (see the special identifier 'all' in "Controlling Warning
%   Message Display" below). When WARNMSG is the only input to WARNING,
%   WARNING displays it literally, without performing any substitutions
%   (see below) on the characters in WARNMSG.
%
%   WARNING(WARNMSG, A, B, ...) displays the formatted warning message
%   WARNMSG. The WARNMSG, specified as a character vector or string scalar,
%   may contain escape sequences (such as \t or \n) as well as the C
%   language conversion specifiers (e.g., %s or %d) that are supported by
%   the SPRINTF function. WARNING makes substitutions for the escape
%   sequences and conversion specifiers in the same way that SPRINTF does.
%   Additional arguments A, B, ... provide the values that correspond to
%   the format specifiers and are only required if conversion specifiers
%   appear in WARNMSG. Type HELP SPRINTF for more information on escape
%   sequences and format specifiers. WARNING performs these substitutions
%   on WARNMSG in all cases where more than one input is passed to WARNING.
%
%   WARNING(WARNID, WARNMSG, A, B, ...) displays the formatted warning
%   message WARNMSG as in the paragraph above, and tags the warning with
%   the warning identifier WARNID. The identifier can be used to enable or
%   disable display of the identified warning (See "Controlling Warning
%   Message Display" below). A warning identifier is a character vector or
%   string scalar of the form <component>[:<component>]:<mnemonic>, where
%   <component> and <mnemonic> are alphanumeric (for example,
%   'MATLAB:singularMatrix').
%
%   Controlling Warning Message Display
%   -----------------------------------
%   WARNING('OFF', WARNID) and WARNING('ON', WARNID) disable and enable the
%   display of any warning tagged with warning identifier WARNID. (Use
%   LASTWARN to determine the identifier of a warning, or use the WARNING
%   VERBOSE feature described below.) WARNING is not case sensitive when
%   matching warning identifiers.
%
%   S = WARNING('OFF', WARNID) and S = WARNING('ON', WARNID) additionally
%   return the previous warning state of any warning tagged with warning
%   identifier WARNID. This state information is returned in a structure S
%   with fields 'identifier' and 'state'.
%
%   WARNING('QUERY', WARNID) displays the state ('on' or 'off') for
%   warnings with identifier WARNID. S = WARNING('QUERY', WARNID) returns
%   the state in a structure S with fields 'identifier' and 'state'.
%
%   In the three cases above, WARNID can also be 'all', in which case all
%   warnings (including untagged ones) are disabled, enabled, or queried,
%   as well as 'last', in which case the last displayed warning is
%   disabled, enabled, or queried.
%
%   WARNING ON BACKTRACE and WARNING OFF BACKTRACE control the display of
%   the file and line number that produced a warning when the warning is
%   displayed.
%
%   WARNING ON VERBOSE and WARNING OFF VERBOSE control the displaying of an
%   extra line of helpful text containing the warning identifier when a
%   warning is displayed.
% 
%   S = WARNING('QUERY', ARG) where ARG is either 'BACKTRACE' or 'VERBOSE'
%   returns a structure S with fields 'identifier' containing ARG and
%   'state' containing the current state of ARG.
%
%   WARNING(S) where S is a structure with fields 'identifier' and 'state'
%   is equivalent to
%
%       for k = 1:numel(S), warning(S(k).state, S(k).identifier); end
%       
%   In other words, WARNING accepts as an input the same structure it
%   returns as an output. This restores the states of warnings to their
%   previous values.
%
%   See also SPRINTF, LASTWARN, DISP, ERROR, ERRORDLG, WARNDLG.

%   Copyright 1984-2019 The MathWorks, Inc.
%   Built-in function.
