Package: coder
Superclasses: coder.ArrayType
Represent set of MATLAB enumerations
Specifies the set of MATLAB® enumerations that the generated
code should accept. Use only with the fiaccel
-args
options.
Do not pass as an input to a generated MEX function.
Note
You can also create and edit coder.Type
objects
interactively by using the Coder Type Editor. See Create and Edit Input Types by Using the Coder Type Editor.
enum_type = coder.typeof(
creates a enum_value
)coder.EnumType
object representing a set of
enumeration values of class (enum_value
).
enum_type = coder.typeof(
returns
a modified copy of enum_value
, sz
, variable_dims
)coder.typeof(enum_value)
with
(upper bound) size specified by sz
and variable
dimensions variable_dims
. If sz
specifies inf
for
a dimension, then the size of the dimension is unbounded and the dimension
is variable size. When sz
is [], the (upper bound)
sizes of v
do not change. If you do not specify variable_dims
,
the bounded dimensions of the type are fixed; the unbounded dimensions
are variable size. When variable_dims
is a scalar,
it applies to bounded dimensions that are not 1
or 0
(which
are fixed).
enum_type = coder.newtype(
creates
a enum_name
,sz
,variable_dims
)coder.EnumType
object that has variable size with
(upper bound) sizes sz
and variable dimensions variable_dims
.
If sz
specifies inf
for a dimension,
then the size of the dimension is unbounded and the dimension is variable
size. If you do not specify variable_dims
, the
bounded dimensions of the type are fixed. When variable_dims
is
a scalar, it applies to bounded dimensions that are not 1
or 0
(which
are fixed).
|
Enumeration value defined in a file on the MATLAB path. |
|
Size vector specifying each dimension of type object. Default: [1 1] for |
|
Logical vector that specifies whether each dimension is variable size (true) or fixed size (false). Default: false(size(sz)) | sz==Inf for |
|
Name of enumeration defined in a file on the MATLAB path. |
|
Class of values in the set. |
|
The upper-bound size of arrays in the set. |
|
A vector specifying whether each dimension of the array is fixed
or variable size. If a vector element is |
Value. To learn how value classes affect copy operations, see Copying Objects.
Create a coder.EnumType
object using a value
from an existing MATLAB enumeration.
Define an enumeration MyColors
.
On the MATLAB path, create a file named 'MyColors' containing:
classdef MyColors < int32 enumeration green(1), red(2), end end
Create a coder.EnumType
object from
this enumeration.
t = coder.typeof(MyColors.red);
Create a coder.EnumType
object using the name
of an existing MATLAB enumeration.
Define an enumeration MyColors
.
On the MATLAB path, create a file named 'MyColors' containing:
classdef MyColors < int32 enumeration green(1), red(2), end end
Create a coder.EnumType
object from
this enumeration.
t = coder.newtype('MyColors');
coder.ArrayType
| coder.newtype
| coder.resize
| coder.Type
| coder.typeof
| fiaccel
| coder.ClassType
(MATLAB Coder)