Question

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.

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top