% s = square(t,duty) % % Generate a square wave of period 2 pi with limits +1/-1. % % If the duty cycle is specified, the square wave is +1 for % that portion of the time. % % on time % duty cycle = ------------------ % on time + off time %