PS Sign

Output sign of input physical signal

  • Library:
  • Simscape / Foundation Library / Physical Signals / Nonlinear Operators

  • PS Sign block

Description

The PS Sign block returns the sign of the input physical signal:

  • The output is 1 when the input is greater than zero.

  • The output is 0 when the input is equal to zero.

  • The output is –1 when the input is less than zero.

Both the input and the output are physical signals. Untyped physical ports facilitate the signal size propagation. The output signal is always unitless.

Ports

Input

expand all

Input physical signal.

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

Output

expand all

Output physical signal. The signal size is the same as the size of the input signal, but the unit is always 1 (unitless).

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

Compatibility Considerations

expand all

Behavior changed in R2019a

Extended Capabilities

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

Introduced in R2007b