mustBeSparse
Syntax
Description
mustBeSparse(
throws an error if
value
)value
is not sparse. If value
is empty, the function
does not throw an error. This function does not return a value.
mustBeSparse
calls the issparse
function to determine if the input is sparse.
Class support: All numeric classes, logical
, and MATLAB® classes that overload issparse
.
Examples
Input Arguments
Tips
mustBeSparse
is designed to be used for property and function argument validation.
Extended Capabilities
Version History
Introduced in R2023b