Simulink Reference    
Product

Multiply or divide inputs

Library

Simulink Math Operations and Fixed-Point Blockset Math

Description



The Product block performs multiplication or division of its inputs.

This block produces outputs using either element-wise or matrix multiplication, depending on the value of the Multiplication parameter. You specify the operations with the Number of inputs parameter. Multiply(*) and divide(/) characters indicate the operations to be performed on the inputs:

When the Show additional parameters check box is selected, some of the parameters that become visible are common to many blocks. For a detailed description of these parameters, refer to Block Parameters in the Fixed-Point Blockset documentation.

Data Type Support

The Product block accepts signals of any complexity and data type, including fixed-point data types except int64 and uint64. All input signals must be of the same data type.

Parameters and Dialog Box

Number of inputs
Enter the number of inputs or a combination of "*" and "/" symbols. See Description above for a complete discussion of this parameter.
Multiplication
Specify element-wise or matrix multiplication. See Description above for a complete discussion of this parameter.
Show additional parameters
If selected, additional parameters specific to implementation of the block become visible as shown.

Require all inputs to have same data type
Select this parameter to require that all inputs must have the same data type.
Output data type mode
Specify the output data type and scaling to be the same as the first input, or inherit the data type and scaling by an internal rule or by backpropagation. You can also choose a built-in data type from the drop-down list. Lastly, if you choose Specify via dialog, the Output data type, Output scaling value, and Lock output scaling against changes by the autoscaling tool parameters become visible.
If you select Inherit via internal rule for this parameter, Simulink chooses a combination of output scaling and data type that requires the smallest amount of memory consistent with accommodating the output range and maintaining the output precision (and avoiding underflow in the case of division operations). If the Production hardware characteristics parameter on the Advanced pane of the Simulation Parameters dialog is set to Unconstrained integer sizes, Simulink chooses the data type without regard to hardware constraints. If the parameter is set to Microprocessor, Simulink chooses the smallest available hardware data type capable of meeting range, precision, and underflow constraints. For example, if the block multiplies inputs of type int8 and int16 and Unconstrained integer sizes is specified, the output data type is sfix24. If Microprocessor is specified and the microprocessor supports 8-bit, 16-bit, and 32-bit words, the output data type is int32. If none of the word lengths provided by the target microprocessor can accommodate the output range, Simulink displays an error message in the Simulink Diagnostic Viewer.
Output data type
Specify any data type, including fixed-point data types. This parameter is only visible if Specify via dialog is selected for the Output data type mode parameter.
Output scaling value
Set the output scaling using radix point-only or [Slope Bias] scaling. This parameter is only visible if Specify via dialog is selected for the Output data type mode parameter.
Lock output scaling against changes by the autoscaling tool
If selected, Output scaling is locked. This parameter is only visible if Specify via dialog is selected for the Output data type mode parameter.
Round integer calculations toward
Select the rounding mode for fixed-point output.
Saturate on integer overflow
If selected, overflows saturate.

Conversions and Operations

The Product block first performs the specified multiply or divide operations on the inputs, and then converts the results to the output data type using the specified rounding and overflow modes. Refer to Rules for Arithmetic Operations in the Fixed-Point Blockset documentation for more information about the rules that this block obeys when performing fixed-point operations.

Characteristics

Dimensionalized
Yes
Direct Feedthrough
Yes
Sample Time
Inherited from driving block
Scalar Expansion
Yes
Zero Crossing
No


  Prelook-Up Index Search Probe