Main Content

PS Subtract

Compute simple subtraction of two input physical signals

  • PS Subtract block

Libraries:
Simscape / Foundation Library / Physical Signals / Functions

Description

The PS Subtract block subtracts one physical signal input from another and outputs the difference:

O=I1I2

where

I1Physical signal at the first input port (marked with the plus sign)
I2Physical signal at the second input port (marked with the minus sign)
OPhysical signal at the output port

Physical signals at the two input ports must have commensurate units. The unit at the output port is determined by unit propagation rules. For more information, see Physical Signal Unit Propagation.

Examples

Ports

Input

expand all

First input physical signal. In the block icon, this port is marked with a plus sign (+).

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, to be subtracted from the first. In the block icon, this port is marked with a minus sign (-).

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.

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 R2007a

expand all