Main Content

PS Dot Product

Calculate scalar dot product of two vector or matrix physical signals

Since R2023b

  • PS Dot Product block

Libraries:
Simscape / Foundation Library / Physical Signals / Functions

Description

The PS Dot Product block calculates the scalar dot product of two vector or matrix physical signals:

y=dot(u1,u2)

where:

  • y is the physical signal at the output port O.

  • u1 is the physical signal at the input port I1.

  • u2 is the physical signal at the input port I2.

The two input physical signals can be either vectors or matrices:

  • If u1 and u2 are vectors, then they must have the same length.

  • If u1 and u2 are matrices, then they must have the same size and the block computes the column-wise dot product.

The unit at the output port is determined by unit propagation rules. For more information, see Physical Signal Unit Propagation.

Ports

Input

expand all

First input physical signal specified as a row or column vector or a matrix.

The port name is not visible in the block icon, but you can see this name in the underlying source file by clicking the Source code link in the Description tab of the block dialog box.

Second input physical signal specified as a vector or matrix of the same size as I1.

The port name is not visible in the block icon, but you can see this name in the underlying source file by clicking the Source code link in the Description tab of the block dialog box.

Output

expand all

Output physical signal, scalar.

The port name is not visible in the block icon, but you can see this name in the underlying source file by clicking the Source code link in the Description tab of the block dialog box.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

Version History

Introduced in R2023b