mustBeMember
Validate that value is member of specified set
Syntax
Description
mustBeMember(
throws an error if value
,S
)value
is not a member of the set of values specified by S
. The set of values specified by value
must be a case-sensitive, exact match. mustBeMember
does not return a value.
When using mustBeMember
as a property or function argument validation function, ensure that the property default value is a member of the set.
mustBeMember
calls the following function to determine if value
is a member of the set of values specified by S
.
Class support: All numeric classes, logical
, char
, and MATLAB® classes that overload ismember
.
Examples
Input Arguments
Tips
mustBeMember
is designed to be used for property and function argument validation.
Extended Capabilities
Version History
Introduced in R2017a