Check validity of colormap
iptcheckmap(
checks the validity of the MATLAB® colormap map
,func_name
,var_name
,arg_pos
)map
and issues a
formatted error message if the colormap is invalid.
If the colomap is valid, then
iptcheckmap
returns
nothing.
If the colormap is invalid, then
iptcheckmap
issues a formatted
error message that includes information about the
function name (func_name
), the
variable name (var_name
), and
the argument position
(arg_pos
). These values are
used only to create the error message, not to check
whether the array is valid.
The figure shows the format of the error message and indicates which
parts you can customize using iptcheckmap
arguments.
bad_map = ones(10); iptcheckmap(bad_map,'func_name','var_name',2)
Function FUNC_NAME expected input number 2, var_name, to be a valid colormap. Valid colormaps must be nonempty, double, 2-D matrices with 3 columns.
iptcheckhandle
| iptnum2ordinal
| narginchk
| validateattributes
| validatestring