| Contents | Index |
Represent set of MATLAB fixed-point arrays
Specifies the set of fixed-point array values that the generated code should accept. Use with the fiaccel -args options.
t=coder.typeof(v) creates a coder.FiType object representing a set of fixed-point values whose properties are based on the fixed-point input v.
t=coder.typeof(v, sz, variable_dims) returns a modified copy of coder.typeof(v) 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 the variable_dims input parameter, all the dimensions of the type are fixed, except for those that are unbounded. When variable_dims is a scalar, it applies to all the dimensions, except if the dimension is 1 or 0, which are fixed, or if the dimension is unbounded, which is always variable size.
t=coder.newtype('embedded.fi', numerictype, sz, variable_dims) creates a coder.Type object representing a set of fixed-point values with numerictype and (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. When you do not specify variable_dims, all the dimensions of the type are fixed, except for those that are unbounded. When variable_dims is a scalar, it applies to all the dimensions of the type, except if the dimension is 1 or 0, which is always fixed.
t=coder.newtype('embedded.fi', numerictype, sz, variable_dims, Name, Value) creates a coder.Type object representing a set of fixed-point values with numerictype and additional options specified by one or more Name, Value pair arguments. Name can also be a property name and Value is the corresponding value. Name must appear inside single quotes (''). You can specify several name-value pair arguments in any order as Name1,Value1,…,NameN,ValueN.
Specify optional comma-separated pairs of Name,Value arguments, where Name is the argument name and Value is the corresponding value. Name must appear inside single quotes (' '). You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.
Value. To learn how value classes affect copy operations, see Copying Objects in the MATLAB Programming Fundamentals documentation.
Create a new fixed-point type t.
t = coder.typeof(fi(1)); % Returns % coder.FiType % 1x1 embedded.fi % DataTypeMode:Fixed-point: binary point scaling % Signedness:Signed % WordLength:16 % FractionLength:14
Create a new fixed-point type for use in code generation. The fixed-point type uses the global fimath.
t = coder.newtype('embedded.fi',numerictype(1, 16, 15), [1 2])
t =
% Returns
% coder.FiType
% 1x2 embedded.fi
% DataTypeMode: Fixed-point: binary point scaling
% Signedness: Signed
% WordLength: 16
% FractionLength: 15This new type uses the global fimath.
coder.ArrayType | coder.newtype | coder.resize | coder.Type | coder.typeof | fiaccel

Learn how to apply early verification to your development process through these technical resources.
How much time do you spend on testing to ensure implementation meets system-level requirements?
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |