Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #4570 > unrolled thread

Re: discrete Fourier transform

Started byDaniel Lichtblau <danl@wolfram.com>
First post2011-08-26 09:25 +0000
Last post2011-08-26 09:25 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: discrete Fourier transform Daniel Lichtblau <danl@wolfram.com> - 2011-08-26 09:25 +0000

#4570 — Re: discrete Fourier transform

FromDaniel Lichtblau <danl@wolfram.com>
Date2011-08-26 09:25 +0000
SubjectRe: discrete Fourier transform
Message-ID<j37oqq$4gd$1@smc.vnet.net>
On 08/25/2011 06:05 AM, tarun dutta wrote:
> I have a text file (in my desktop)in which there are two columns one
> is time and another is the result as
> 0   0.956
> 2   0.265
> ...................etc
> now I have to plot the data after doing discrete fourier transform of
> this data.how will I do that ?
> I used
>
> data=Import["output.txt", "Table"]
> pt=Fourier[data]
> ListLinePlot[pt]
> but itz not working.can any one help me by giving a solution.
> regards,
> tarun
>

Might be you want to take the DFT of the second coordinates.

Example:

n = 20;
data = Transpose[{Range[2, 2*n, 2], RandomReal[{-5, 5}, n]}];
pt = Fourier[data[[All, 2]]];

Next issue is the DFT will have elements with real and imaginary parts. 
So you'll want to plot them separately.

ListLinePlot[{Re[pt], Im[pt]}]

Another issue is that the DFT is not in any way accounting for our x 
coordinates being double the assumed 1,2,...,n. How this gets handled 
depends on what it is you really need from the transform. Very likely 
you won't do anything at all, unless and until taking the inverse transform.

Daniel Lichtblau
Wolfram Research

[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web