Suppose a class MyClass with overloaded operators for comparison with numeric values. In other words, I can call
obj = MyClass();obj > 0; obj >= 0; obj < 0; obj <=0;
and get appropriate results. However, the calls
validateattributes(obj,{'MyClass'},{'positive'})validateattributes(obj,{'MyClass'},{'nonnegative'})
always fail. Is this a bug, or is validateattributes using something other than gt, ge, lt, le calls?
Thanks, -naor (R2014b)
Best Answer