### Navigation

- index
- modules |
- modules |
- next |
- previous |
- SciPy v0.9 Reference Guide (DRAFT) »
- Signal processing (`scipy.signal`) »

# scipy.signal.square

`scipy.signal.``square`(t, duty=0.5)

  Return a periodic square-wave waveform.

  The square wave has a period 2*pi, has value +1 from 0 to 2*pi*duty and -1 from 2*pi*duty to 2*pi. duty must be in the interval [0,1].

  Parameters : | t : array_like The input time array. duty : float, optional Duty cycle.
  Returns : | y : array_like The output square wave.

### Navigation

- index
- modules |
- modules |
- next |
- previous |
- SciPy v0.9 Reference Guide (DRAFT) »
- Signal processing (`scipy.signal`) »