This example shows (graphically) how the Fourier series expansion for a square wave is made up of a sum of odd harmonics.
www.mathworks.com