Fixed-Point Blockset
  Go to block:
    Search    Help Desk 
FixPt Gain

The FixPt Gain block is a masked S-function that multiplies the input by a constant value (referred to as the gain). To multiply the input by a constant matrix, see FixPt Matrix Gain.

The gain is specified with the Gain value parameter. The gain can be a scalar or a vector.

The Parameter data type parameter can have the same values as the Output data type parameter as discussed in "Block Parameters". Additionally, if the Parameter data type is a generalized fixed-point number, then you can select from these scaling modes:

For a description of all other parameters, refer to "Block Parameters".

If the block is configured for a single gain value, the block icon displays that value. If the block is configured to generate a vector of gains, the block icon displays K. For a description of how the block icon displays the output data type, refer to "Block Icon Display".

Parameters and Dialog Box

Gain value
Specify as a vector or scalar.
Parameter data type
Any data type supported by the Fixed-Point Blockset.
Parameter scaling
Radix point-only or slope/bias scaling. Additionally, if Gain value is specified as a vector, it can be scaled using the constant vector scaling modes for maximizing precision. These scaling modes are only available for generalized fixed-point data types.
Output data type
Any data type supported by the Fixed-Point Blockset.
Output scaling
Radix point-only or slope/bias scaling. These scaling modes are only available for generalized fixed-point data types.
Lock output scaling
If checked, Output scaling is locked. This feature is only available for generalized fixed-point output.
Round toward
Rounding mode for the fixed-point output.
Saturate to max or min when overflows occur
If checked, fixed-point overflows saturate. Otherwise, they wrap.
Override with doubles
If checked, the Output data type is overridden with doubles.
Log minimums and maximums
If checked, minimum and maximum simulation values are logged to the workspace.

Conversions and Operations

The Gain value parameter is converted from doubles to the specified data type offline using round-to-nearest and saturation. Refer to "Parameter Conversions" in the manual for more information about parameter conversions.

The FixPt Gain block first multiples its inputs by the Gain value parameter, and then converts those results to the output data type using the specified rounding and overflow modes. Refer to "Rules for Arithmetic Operations" in the manual for more information about the rules this block adheres to when performing operations.

Characteristics

Input Ports
Any data type supported by the blockset
Output Port
Any data type supported by the blockset
Direct Feedthrough
Yes
Sample Time
Inherited
Scalar Expansion
Of inputs and gain
States
0
Vectorized
Yes



[ Previous | Help Desk | Next ]