mustBeScalarOrEmpty
R2026bValidate that value is scalar or empty
Description
mustBeScalarOrEmpty( throws an error if
value)value is not a scalar or is not an empty array. This function does not
return a value. mustBeScalarOrEmpty calls the isscalar and isempty functions to determine if the input
is a scalar or an empty array.
Class support: All numeric classes, logical, char,
string, and MATLAB® classes that implement isscalar and
isempty.
Examples
Input Arguments
Tips
mustBeScalarOrEmptyis designed to be used for property and function argument validation.
Extended Capabilities
Version History
Introduced in R2020b