Equivalent of enumerated type in Matlab
<p>I would like to define a data type in Matlab that can be 1 of 3 possible values. If I were doing this in C I would do the following:</p>

<pre><code>typedef enum
{
    TYPE1,
    TYPE2,
    TYPE3,
} new_type_t;

new_type_t variable = TYPE1;
</code></pre>

<p>How can I achieve something similar in Matlab?</p>

<p>Ideally I want to have a Matlab class with a property that is restricted to some enumerated type.</p>

<p>My attempt at the Matlab code:</p>

<pre><code>classdef Node
    classdef BoundaryTypes
        enumeration
            adiabatic
            convective
            conductive
        end
    end
    properties
        k
        c_p
        rho
        BC %type of boundary condition
    end

end
</code></pre>