# Spectrum analysis of square wave

Discussion in 'Math' started by Chradem, Nov 13, 2009.

1. ### Chradem Thread Starter New Member

Nov 13, 2009
2
0
I would like to have the frequency power spectrum of a square wave.

The duration of one wave (T/2) is 0.1 ms. Only the positive part is used. However the amount of squares also varies from 1 to 30 Hz.

So I would like to compare the spectral densities of 30 Hz and 1 Hz squarewaves, in which each square has a duration of 0.1 ms.

Could anyone tell me how to do this.

2. ### steinar96 Active Member

Apr 18, 2009
239
4
If you have the data, you can take the DTFT (discrete time fourier transform) of it in matlab for example. And analyze the different waveforms you get.

Last edited: Nov 13, 2009
3. ### Thav Member

Oct 13, 2009
82
0
There are fourier transform pairs that will help you get the frequency spectrum. From there the spectral density is something related to the integral of the frequency spectrum in a certain band. Since the square wave is the sum of discrete frequencies, the spectral density can be rewritten as a sum instead of an integral.