Square wave test signal
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.
Create a square wave with a period of 10.
square(et/10)
square
signal generation statements can be used in the Test Sequence
and Test Assessment blocks and in Stateflow® charts.