The basic requirement is that you need to specify three characteristics for each input argument of the entry-point functions:
- The class of the variable (e.g. double, single, char, int32, etc.)
- The array size (or at least the upper bound of each dimension)
- The complexity of the variable (false indicates real-valued, true indicates complex).
In general, you do not need to specify these characteristics for any variables other than the input arguments of the entry-point functions, as long as MATLAB Coder can infer what they are from the code itself.
If you do not specify any of these characteristics for any of the input arguments, MATLAB Coder will assume the following default values:
- the class will be double
- the array size will be scalar (1 x 1)
- the complexity will be false (real-valued)
The Coder GUI, however, will generally show <Undefined> for each input argument until you actually specify these three characteristics. If you do not specify any variable that is <Undefined>, then MATLAB Coder will return an error when you try to generate the code.
HTH.
Rick
Best Answer