This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

SquareWave

SquareWave[x]
gives a square wave that alternates between +1 and -1 with unit period.
SquareWave
gives a square wave that alternates between and with unit period.
SquareWave is periodic with period 1:
In[1]:=
Click for copyable input
Out[1]=
 
SquareWave is periodic with period 1:
In[1]:=
Click for copyable input
Out[1]=
SquareWave of real arguments always returns an exact result of 1, -1, or 0:
SquareWave threads element-wise over lists:
Square wave with specified boundary values:
Square wave sound sample:
Fourier decomposition:
Use FunctionExpand to expand SquareWave in terms of elementary functions:
Use PiecewiseExpand to obtain piecewise representation:
Integration:
SquareWave is only defined on real numbers:
New in 7