This class restricts the value of Prop1
to nonnegative values.
Create an object and assign a value to its property.
Error using mustBeNonnegative (line 14)
Value must be nonnegative.
When you assign a value to the property, MATLAB® calls mustBeNonnegative
with the value being assigned to the property. mustBeNonnegative
issues an error because the value -10
is negative.