MathGroup Archive 2007

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

Search the Archive

plotting fourier amplitude versus frequency

  • To: mathgroup at smc.vnet.net
  • Subject: [mg80198] plotting fourier amplitude versus frequency
  • From: Indrani Sinha <indrani_sinha at yahoo.com>
  • Date: Tue, 14 Aug 2007 07:15:51 -0400 (EDT)

Hi,

I am trying to extract frequencies from a data set of
length versus time. 

Dataset:
time   bondlength

I am using the following script:
data = ReadList["length.dat",{Number,Number}];
plain=N[Transpose[data][[2]]];
f=Fourier[plain];
s=OpenWrite["fourier_tmp.dat"];
WriteString[s,"#"];
Do[Write[s,Abs[f[[i]]]],{i,1,Length[f]}];
Close[s];
!sed 's/*\^/e/g' fourier_tmp.dat > cfourier.dat
Quit

This gives me an output file cfourier.dat with the
fourier amplitude values, but how do I get the
corresponding frequencies?

Also the first line in the output has a number; what
does that signify?

Thank you very much,
Indrani



      ____________________________________________________________________________________
Luggage? GPS? Comic books? 
Check out fitting gifts for grads at Yahoo! Search
http://search.yahoo.com/search?fr=oni_on_mail&p=graduation+gifts&cs=bz


  • Prev by Date: A different font size for each line in PlotLabel
  • Next by Date: Re: Intensive numerical calculations
  • Previous by thread: Re: A different font size for each line in PlotLabel
  • Next by thread: Re: plotting fourier amplitude versus frequency