🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.soft-sys.matlab
Article #145

Re: Shape information preservation in DFT

#145
From: Barry D. Jacobson
Date: Sun, 13 May 2001 15:54
67 lines
4531 bytes
Hi David:

I think Bob's answer was not exactly what you were looking for, and was
based on more complex mathematics. I think the answer to what is
bothering you is the sampling rate issue. Matlab's FFT produces a set of
frequency points which need additional information from you to interpret
what frequency they correspond to in real life. The length of the
sequence and the sampling rate determine the mapping to real life. For
instance if you have a sequence of length L and sampling rate Fs then
the highest real-life frequency (which is actually at about the midpoint
of your Matlab FFT sequence) corresponds to 1/2 the sampling rate
(Nyquist frequency). Each frequency point is then 2/L of the Nyquist
freq. (The factor of 2 comes in because the second half of FFT sequence
is mirror image of first and contains no new information for real
signals. (These are called the negative frequencies which, in the usual
DSP convention follow the positive freqs instead of preceeding them as
in analog world. You can switch arrangement using FFTSHIFT command) The
first frequency point is the DC value. The next is (Fs/2)/(L/2) or Fs/L
the next is 2Fs/L, the next 3Fs/L until you reach midpoint (L/2) (Fs/L)
or simply Fs/2, the highest possible freq. (next point begins the
negative freqs). So if you have sequence 1000 points long and Fs is
100Hz, then first point is DC, second is .1 Hz, third is .2 Hz, fourth
is .3 Hz, etc. (Note people normally use a power of 2 for length of FFT
but this is only because FFT computation is faster that way. There is
nothing else magic or more accurate about powers of 2, contrary to
popular misconception.)

When you use IFFT to transform back to time, you still have same issue
of what point in real life time corresponds to each point in sequence.
The answer here also depends on sampling rate. The first point is
starting point T0 the second point is T0 plus 1/Fs, the next  T0 plus
2/Fs, etc. Since sampling rate figures into both calculations, the FFT
and IFFT sequences are really not affected by whatever sampling rate you
choose. The only difference is the mapping to real life. So matlab just
takes one sequence as input and produces other sequence as output. It is
up to you to interpret what they mean in your system. This is why many
digital signal processing functions in matlab use a normalized sampling
rate from 0 to 1 instead of your actual rate. You just multiply or
divide by real sampling rate to convert between the two.

I hope this clears things up.

Barry Jacobson
Harvard-MIT Division of Health Sciences and Technology
bdj@mit.edu

Maybe this

David Page <david@REMOVE_SPAM.imhost.com> wrote in message
news:eMqL6.71357$2U.31863845@news2.rdc2.tx.home.com...
> I am a novice in Matlab. Please excuse if this question sounds silly.
>
> I am experimenting with fft and ifft function of Matlab. When I take a
> fourier transform of a function, it fives me the frequency and its
amplitude
> (weight of the frequency) and does not contain any information about
the
> location of these frequencies.
>
> If the above is true, how can it reconstruct the whole signal again
when
> ifft is applied ? How does it remember the locations of the
frequencies ?
>
> Thanks in advance.
>
>
Technical Details
Message-ID: <Y6yL6.46346$Rg2.1574300@typhoon2.ba-dsg.net>
Path: arc1-ca.pugleaf.net!archiver1.sj.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.skycache.com!Cidera!cyclone1.ba-dsg.net!spamfinder.gnilink.com!typhoon2.ba-dsg.net.POSTED!not-for-mail
References: <eMqL6.71357$2U.31863845@news2.rdc2.tx.home.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 106e3f,cf2671a3d7a1d749
X-Google-Attributes: gid106e3f,public
X-Google-Thread: 10d67e,cf2671a3d7a1d749
X-Google-Attributes: gid10d67e,public
X-Google-ArrivalTime: 2001-05-13 08:54:34 PST
Path: arc1-ca.pugleaf.net!archiver1.sj.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.skycache.com!Cidera!cyclone1.ba-dsg.net!spamfinder.gnilink.com!typhoon2.ba-dsg.net.POSTED!not-for-mail
Reply-To: "Barry D. Jacobson" <bdj@mit.edu>
From: "Barry D. Jacobson" <bdjacobs@bellatlantic.net>
Newsgroups: comp.soft-sys.matlab,aus.mathematics
References: <eMqL6.71357$2U.31863845@news2.rdc2.tx.home.com>
Subject: Re: Shape information preservation in DFT
Lines: 69
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
Message-ID: <Y6yL6.46346$Rg2.1574300@typhoon2.ba-dsg.net>
Date: Sun, 13 May 2001 15:54:32 GMT
NNTP-Posting-Host: 151.203.16.103
X-Complaints-To: business-support@verizon.com
X-Trace: typhoon2.ba-dsg.net 989769272 151.203.16.103 (Sun, 13 May 2001 11:54:32 EDT)
NNTP-Posting-Date: Sun, 13 May 2001 11:54:32 EDT