MathGroup Archive 2007

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

Search the Archive

Re: plotting fourier amplitude versus frequency

  • To: mathgroup at smc.vnet.net
  • Subject: [mg80235] Re: plotting fourier amplitude versus frequency
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Wed, 15 Aug 2007 04:21:27 -0400 (EDT)
  • Organization: Uni Leipzig
  • References: <f9s4fk$atf$1@smc.vnet.net>
  • Reply-to: kuska at informatik.uni-leipzig.de

Hi,

for a discrete Fourier transform of a data set of length K,
the frequencies of the entry i is (i-1) 2Pi/K

Regards
   Jens

Indrani Sinha wrote:
> 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: Re: Reproducible kernel crash
  • Next by Date: Re: A different font size for each line in PlotLabel
  • Previous by thread: Re: plotting fourier amplitude versus frequency
  • Next by thread: Question about memory consumption in my codes by using Mathematica 6, Thanks!