square
Square wave test signal
Syntax
Description
square(
creates a square wave with a period
of 1 and range -1 to 1. In the interval 0 <= x < 1, x
)square(x)
returns 1 for 0 <= x < 0.5 and -1 for 0.5 <= x < 1.
To specify the number of square wave cycles within a test step, use this operator with
the elapsed time (et
) operator.
Examples
Tips
square
signal generation statements can be used in the Test Sequence and Test Assessment blocks.square
signal generation statements cannot be used in Stateflow® charts.
Version History
Introduced in R2015a