Validate that value is positive
mustBePositive(
throws an error if value
)value
is not positive. Values are positive when they are real, numeric, and greater than zero. This function does not return a value.
mustBePositive
calls these functions to determine if the input is not positive:
Class support: All numeric classes, logical
, and MATLAB® classes that overload the functions called by mustBePositive
.
This function ignores input arguments that are empty values. Therefore, no error is thrown when the property or function argument value is empty.
mustBePositive
is designed to be used for property and function argument validation.