Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: FFT,IFFT, and NDFT,NFFT
Date: Tue, 7 Jul 2009 00:16:01 +0000 (UTC)
Organization: Uofc
Lines: 66
Message-ID: <h2u441$imq$1@fred.mathworks.com>
References: <h25v6u$5ia$1@fred.mathworks.com> <6ced5282-e4f9-4712-9546-158d71c222b0@j14g2000vbp.googlegroups.com> <61a1276a-88b8-48a1-8883-215a2f29732f@q40g2000prh.googlegroups.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1246925761 19162 172.30.248.38 (7 Jul 2009 00:16:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 7 Jul 2009 00:16:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1662491
Xref: news.mathworks.com comp.soft-sys.matlab:553268


dbd <dbd@ieee.org> wrote in message <61a1276a-88b8-48a1-8883-215a2f29732f@q40g2000prh.googlegroups.com>...
> On Jul 6, 1:47 pm, "guj " <gulatiaks...@gmail.com> wrote:
> 
> >
> > What are your comments on the code below:
> > FFT is giving the same result as DFT for Non uniform sampling. I am curious to know the difference between NDFT and DFT ...Notation
> 
> >  CODE REMOVED
> 
> > So question is Which one is right for Non uniform sampling..
> 
> Neither
> 
> > Is matlab DFT formula (which i have taken from help) is same as FFT
> 
> Yes
> 
> > and can handle only fixed sample...



So MATLAB DFT Fornula which is

> 
> Yes
> 
> > what factor in DFT algorithm constraining it for fixed sampling.
> >
> > In DFT, algorithm we are multiplying our Coefficient with twiddle factor, that twiddle factor is equally spaced ...is that the constrain...
> >
> 
> The FFT and the conventionally defined DFT it is equivalent to are
> only defined for equispaced inputs and outputs when used to transform
> from time to frequency domains. These functions follow the GIGO
> principle. If you input anything else (Garbage In) , you will output
> something else (Garbage Out)
> .
> > twiddle factor= exp(-2*pi*i*k*n/N)   ..IN this when we divide it by N, we only mean to normalise it..isnt it..also 2pi is my sampling frequency ...
> >
> > All these doubts are there because of the code which i have written above and i am dubious why its giving same result as fft
> That is what it is defined to do.
> 
> > ..Also what FFT do when it incur a irregular sampling....although it give wrong result but what is its working on such kind of input
> 
> Remember GIGO!
> 
> 
> Dale B. Dalrymple




So DFT formula e
DFT = x(n) exp(-i*2*pi*((k(:)-1)*(n-1)/N is valid only for equispaced sampling 

and NDFT formula is 

 nonequispaced dft
%
%         N/2-1  
% f(j) =  sum    f_hat(k+N/2+1)*exp(-2*pi*i*k*x(j)), 1 <= j <= M.
%        k=-N/2

where x(j) is non equispaced nodes 

i think now i am on right track, This is Direct way of NDFT..there are also horners way and matrix approach..each take different computational resources and time. And DFT  is just a DIRECT way of  Fourier transform but with fixed sampling.....and FFT is a Butterfly approach of same DFT algorithm ....result will be same in both case and both handles the fixed sampling.