Main Content

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 by clicking the Source code link in the Description tab of 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 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 R2007b

expand all