Simulink Reference Previous page   Next Page
Product

Multiply or divide inputs

Library

Math Operations

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:

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.

Data Type Support

The Product block accepts real or complex signals of any data type supported by Simulink, except Boolean. The Product block supports fixed-point data types.

For a discussion on the data types supported by Simulink, refer to Data Types Supported by Simulink in the Using Simulink documentation.

Parameters and Dialog Box

The Main pane of the Product dialog appears as follows:

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.
Sample time (-1 for inherited)
Specify the time interval between samples. To inherit the sample time, set this parameter to -1. See Specifying Sample Time in the online documentation for more information.

The Signal data types pane of the Product dialog appears as follows:

Require all inputs to have same data type
Select this parameter to require that all inputs 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 Device type parameter on the Hardware Implementation pane of the Configuration Parameters dialog is set to custom, Simulink chooses the data type without regard to hardware constraints. Otherwise, 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 custom is specified as the device type, the output data type is sfix24. If Unspecified (assume 32-bit generic) is specified, the output data type is int32. If none of the word lengths provided by the target hardware can accommodate the output range, Simulink displays an error message in the Simulation Diagnostics Viewer.
Output data type
Specify any data type, including fixed-point data types. This parameter is only visible if you select Specify via dialog for the Output data type mode parameter.
Output scaling value
Set the output scaling using binary point-only or [Slope Bias] scaling. This parameter is only visible if you select Specify via dialog for the Output data type mode parameter.
Lock output scaling against changes by the autoscaling tool
Select to lock scaling of outputs. This parameter is only visible if you select Specify via dialog for the Output data type mode parameter.
Round integer calculations toward
Select the rounding mode for fixed-point operations.
Saturate on integer overflow
Select to have overflows saturate.

Characteristics

Direct Feedthrough
Yes
Sample Time
Specified in the Sample time parameter
Scalar Expansion
Yes
Dimensionalized
Yes
Zero Crossing
No


Previous page  Prelookup Index Search Product of Elements Next page

© 1994-2005 The MathWorks, Inc.