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. 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® software including fixed-point data types.

For a discussion on the data types supported by Simulink software, see Data Types Supported by Simulink® in the 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. Multiply (*) and divide (/) characters indicate the operations to be performed on the inputs:

Multiplication

Specify element-wise or matrix multiplication.

Multiply over (Product of Elements block)

Specify the collapse mode. Select All dimensions or Specified dimension.

Dimension (Product of Elements block)

Specify the dimension over which the operation is to be performed. This parameter appears only if you select Specified dimension for the Multiply over 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 Attributes pane of the Product dialog appears as follows:

Require all inputs to have the same data type

Select this parameter to require that all inputs have the same data type.

Output minimum

Specify the minimum value that the block should output. The default value, [], is equivalent to -Inf. Simulink software uses this value to perform:

Output maximum

Specify the maximum value that the block should output. The default value, [], is equivalent to Inf. Simulink software uses this value to perform:

Output data type

Specify the output data type. You can set it to:

Click the Show data type assistant button to display the Data Type Assistant, which helps you set the Output data type parameter.

See Specifying Block Output Data Types for more information.

If you select Inherit: Inherit via internal rule for this parameter, Simulink software 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 software chooses the data type without regard to hardware constraints. Otherwise, Simulink software 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 software displays an error message in the Simulation Diagnostics Viewer.

Lock output scaling against changes by the autoscaling tool

Select to lock scaling of outputs. This parameter is visible only if you enter an expression for the Output data type parameter.

Round integer calculations toward

Select the rounding mode for fixed-point operations. For more information, see Rounding in the Simulink® Fixed Point™ User's Guide.

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

Multidimensionalized

Yes, only when the Multiplication parameter specifies Element-wise(.*)

Zero Crossing

No

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS