Dot Product

Generate dot product of two vectors

Library

Math Operations

Description

The Dot Product block generates the dot product of the vectors at its inputs. The scalar output, y, is equal to the MATLAB® operation

y = sum(conj(u1) .* u2 )

where u1 and u2 represent the vectors at the block's top and bottom inputs, respectively. (See Changing the Orientation of a Blockin the Simulink® documentation for a description of the port order for various block orientations.) The inputs can be vectors, column vectors (single-column matrices), or scalars. If both inputs are vectors or column vectors, they must be the same length. If u1 and u2 are both column vectors, the block outputs the equivalent of the MATLAB expression u1'*u2.

The elements of the input vectors can be real- or complex-valued signals. The signal type (complex or real) of the output depends on the signal types of the inputs.

Input 1Input 2Output

real

real

real

real

complex

complex

complex

real

complex

complex

complex

complex

To perform element-by-element multiplication without summing, use the Product block.

Data Type Support

The Dot Product block accepts and outputs 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®.

Parameters and Dialog Box

Require all inputs to have same data type

Select to require all inputs to have the same data type.

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.

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

Inherited from driving block

Scalar Expansion

No

States

0

Dimensionalized

Yes

Zero Crossing

No

  


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