Specify Properties of EntryPoint Function Inputs
Why You Must Specify Input Properties
FixedPoint Designer™ must determine the properties of all variables in the MATLAB^{®} files at compile time. To infer variable properties in MATLAB files, FixedPoint Designer must be able to identify the properties of the inputs to the primary function, also known as the toplevel or entrypoint function. Therefore, if your primary function has inputs, you must specify the properties of these inputs, to FixedPoint Designer. If your primary function has no input parameters, FixedPoint Designer can compile your MATLAB file without modification. You do not need to specify properties of inputs to local functions or external functions called by the primary function.
Note
Your primary function cannot be within a MATLAB namespace. Create a wrapper function as the primary function outside the namespace. Call the desired function within the new function as the primary function.
Methods of InputType Specification
Method  Advantages  Disadvantages 

Define Input Properties at the Command Line Note You cannot use this method if you define input properties
by using





Properties to Specify
If your primary function has inputs, you must specify the following properties for each input.
For  Specify properties  

Class  Size  Complexity  numerictype  fimath  
Fixedpoint inputs 





Each field in a structure input  
Other inputs 



Default Property Values
FixedPoint Designer assigns the following default values for properties of primary function inputs.
Property  Default 

class  double 
size  scalar 
complexity  real 
numerictype  No default 
fimath  MATLAB default fimath object 
Supported Classes
The following table presents the class names supported by FixedPoint Designer.
Class Name  Description 

logical  Logical array of true and false values 
char  Character array 
int8  8bit signed integer array 
uint8  8bit unsigned integer array 
int16  16bit signed integer array 
uint16  16bit unsigned integer array 
int32  32bit signed integer array 
uint32  32bit unsigned integer array 
int64  64bit signed integer array 
uint64  64–bit unsigned integer array 
single  Singleprecision floatingpoint or fixedpoint number array 
double  Doubleprecision floatingpoint or fixedpoint number array 
struct  Structure array 
embedded.fi  Fixedpoint number array 
Rules for Specifying Properties of Primary Inputs
When specifying the properties of primary inputs, follow these rules:
The order of elements in the cell array must correspond to the order in which inputs appear in the primary function signature. For example, the first element in the cell array defines the properties of the first primary function input.
To generate fewer arguments than those arguments that occur in the MATLAB function, specify properties for only the number of arguments that you want in the generated function.
If the MATLAB function has input arguments, to generate a function that has no input arguments, pass an empty cell array to
args
.For each primary function input whose class is fixed point (
fi
), specify the inputnumerictype
andfimath
properties.For each primary function input whose class is
struct
, specify the properties of each of its fields in the order that they appear in the structure definition.If you generate a MEX, SIL, or PIL function that accepts an empty array with a given shape, the generated function accepts empty arrays of other shapes as well. The MEX, SIL, or PIL function reshapes the empty runtime input array to match the shape of the array that was specified at code generation time.