Path: news.mathworks.com!newsfeed-00.mathworks.com!solaris.cc.vt.edu!news.vt.edu!news.glorb.com!postnews.google.com!s31g2000yqs.googlegroups.com!not-for-mail
From: Greg <heath@alumni.brown.edu>
Newsgroups: comp.soft-sys.matlab
Subject: Re: FFT,IFFT, and NDFT,NFFT
Date: Sat, 4 Jul 2009 20:46:30 -0700 (PDT)
Organization: http://groups.google.com
Lines: 51
Message-ID: <e104f561-edaa-4505-84c2-cf6bcfb49179@s31g2000yqs.googlegroups.com>
References: <h25v6u$5ia$1@fred.mathworks.com> <6ced5282-e4f9-4712-9546-158d71c222b0@j14g2000vbp.googlegroups.com>
NNTP-Posting-Host: 69.141.163.135
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Trace: posting.google.com 1246765590 4045 127.0.0.1 (5 Jul 2009 03:46:30 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Sun, 5 Jul 2009 03:46:30 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: s31g2000yqs.googlegroups.com; posting-host=69.141.163.135; 
	posting-account=mUealwkAAACvQrLWvunjg50tRAnsNtJR
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 
	2.0.50727),gzip(gfe),gzip(gfe)
Xref: news.mathworks.com comp.soft-sys.matlab:552837


On Jun 28, 12:33 pm, Greg <he...@alumni.brown.edu> wrote:
> On Jun 27, 4:25 pm, "guj " <gulatiaks...@gmail.com> wrote:
-----SNIP
> function   [XFT,XLS,NMSEFT,NMSELS] = DFTgh1(x,t,f)
>
> % function [XFT,XLS,NMSEFT,NMSELS] = DFTgh1(x,t,f)
> %
> % Modification of AJ Johnson's dft for nonuniform sampling
> %
> % Computes XFT (Discrete Fourier Transform) at frequencies
> % given in f, given samples x taken at times t:
> %
> % XFT(f) = sum(k=1,N){ dts(k) *x(k) * exp(-2*pi*j*t(k)*f) }
> %        = W *(x.*dts)
> %
> % where dts is a symmetrized modification of diff(t).
> %
> % Also computes the Least-Squared-Error Spectrum at
> % frequencies given in f, given samples x taken at
> % times t:
> %
> % XLS(f) = (W'\x)./dfs;
> %
> % where dfs is a symmetrized modification of diff(f).
> %
> % NMSEFT is the normalized mean-square-error of reconstucting
> % x from X using the Inverse Fourier Transform formula. If
> % mean(x) = 0, then the MSE is unnormalized.

Correction:

If   mean(x) = x, i.e., x is constant, then the MSE is unnormalized.


> % NMSELS is the normalized mean-square-error of reconstucting
> % x from X using Least Squares. If mean(x) = 0, then the MSE
> % is unnormalized.

Correction:

If   mean(x) = x, i.e., x is constant, then the MSE is unnormalized.

> % For comparison with MATLAB'sFFTwhen the spacing is uniform,
> % double the end values x(1) and x(end) and divide X by dt0 =
> % mean(diff(t))

-----SNIP

Hope this helps.

Greg