Main Content
mustBeNegative
Validate that value is negative
Syntax
Description
mustBeNegative(
throws an error if value
)value
is not negative. A value is negative if it is less than zero. This function does not return a value.
mustBeNegative
calls the following function to determine if the input is negative:
Class support: All numeric classes, logical
, and MATLAB® classes that overload the functions called by mustBeNegative
.
This function ignores input arguments that are empty values. Therefore, no error is thrown when the property or function argument value is empty.
Examples
Input Arguments
Tips
mustBeNegative
is designed to be used for property and function argument validation.
Extended Capabilities
Version History
Introduced in R2017a