1

Is there a way to have an enum like this:

classdef(Enumeration) bla_type < int32
    enumeration
        bla_one(1)
        bla_2(2)
    end
end

with a missing or NaN value? Thanks.

chappjc
  • 30,359
  • 6
  • 75
  • 132
cs0815
  • 16,751
  • 45
  • 136
  • 299

1 Answers1

1

NaN values apply to floating-point types, but not integers. With integers every bit pattern has a numeric meaning. With floating-point some patterns are reserved for NaNs and infinities.

Since your underlying type for your enum is int32, you won't be able to use NaN.

Ben Voigt
  • 277,958
  • 43
  • 419
  • 720