MathGroup Archive 2003

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Spectrum of a sound

  • To: mathgroup at
  • Subject: [mg39563] Re: Spectrum of a sound
  • From: Bill Rowe <listuser at>
  • Date: Sun, 23 Feb 2003 05:00:46 -0500 (EST)
  • Sender: owner-wri-mathgroup at

On 2/22/03 at 3:37 AM, thomasmartinuzzo at (thomas martinuzzo)

>Can you explain to me this problem


>la3[t_]:=Sin[2 ¶­ 440 t]


>ListPlot[suite,PlotJoined\[Rule] True]; nPoints=Length[suite]


>ListPlot[amplitude,PlotJoined\[Rule] True,PlotRange\[Rule]
>All,AxesLabel\[Rule] {Hz,dB}];

There are a couple of problems here.

First[ Fourier returns a list with the zero frequency term first. Generally, you want this to be in the center of the list. So, you need to ListPlot[RotateRight[amplitude,n/2]] to move the zero frequency term to the center.

Second, your labels imply you want the vertical axis in dB. But what you've plotted are the absolute values of the coefficients which will not be in dB. The usual scheme is to reference everything to the coefficient with the largest absolute value. So, to get dB you need 10 Log[10,amplitude/Max[amplitude]]

  • Prev by Date: Re: Programing in MATHEMATICA
  • Next by Date: Cursors in graphics
  • Previous by thread: Spectrum of a sound
  • Next by thread: How to use vector analysis without using suffix notation