s = square (t, duty) ¶s = square (t) ¶Generate a square wave of period 2 pi with limits +1/-1.
If duty is specified, it is the percentage of time the square wave is "on". The square wave is +1 for that portion of the time.
on time * 100
duty cycle = ------------------
on time + off time
See also: cos, sawtooth, sin, tripuls.
Package: signal