Contenu principal

PS Dot Product

R2026b

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.

Programmatic Use

Port: I1

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.

Programmatic Use

Port: I2

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.

Programmatic Use

Port: O

Programmatic Use: Add Block

To add the block programmatically, use the add_block function with one of these library block paths as the source.

"fl_lib/Physical Signals/Functions/PS Dot Product"

Example: add_block("fl_lib/Physical Signals/Functions/PS Dot Product","myModel/myBlock",MakeNameUnique="on")

For information about programmatic access to individual block parameters, see the Programmatic Use section of parameter descriptions on this page.

Extended Capabilities

expand all

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

Version History

Introduced in R2023b