Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Data Manipulation > Signal Processing >

SquareWave

SquareWave[x]
gives a square wave that alternates between +1 and -1 with unit period.
SquareWave[{y1, y2}, x]
gives a square wave that alternates between y1 and y2 with unit period.
  • SquareWave[{min, max}, x] has value max for 0<x<1/2.
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 piece-wise representation:
Integration:
SquareWave is only defined on real numbers:
New in 7
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team