Main Content

heaviside

Heaviside step test signal

Description

example

y = heaviside(x) returns 0 when the input x is less than or equal to 0, and returns 1 when x is greater than 0. Use heaviside with the et operator to create a Heaviside step function at a designated test time. Use heaviside operator in the test step of a Test Sequence or Test Assessment block.

Examples

expand all

In a Test Sequence block, create a Heaviside step signal after 5 seconds.

A test step that outputs a Heaviside step signal after 5 seconds while active.

The Test Sequence block outputs the step function at 5 seconds:

The output of the Test Sequence block, shown in a Scope block.

Input Arguments

expand all

Value during the test step, specified as a numeric scalar.

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64

Version History

Introduced in R2015a