From: Rune Allnor <>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Confusion over calculating Fourier transforms
Date: Wed, 2 Dec 2009 02:27:20 -0800 (PST)
Lines: 18
Message-ID: <>
References: <hf5c3c$1f5$>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
X-Trace: 1259749640 17295 (2 Dec 2009 10:27:20 GMT)
NNTP-Posting-Date: Wed, 2 Dec 2009 10:27:20 +0000 (UTC)
Injection-Info:; posting-host=; 
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; 
	Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; 
	.NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET CLR 1.1.4322),gzip(gfe),gzip(gfe)
Xref: comp.soft-sys.matlab:589459

On 2 Des, 10:30, "Mat Hunt" <> wrote:
> Hi,
> I need to calculate the Fouier transform of some rather complicated functions. Naively, I would do the following (to compute the Fourier transform of a Gaussian say):
> >x=-3:0.001:3;
> >y=exp(-x.^2);
> >f=abs(fft(y));
> >plot(f);
> I just set something which is completely wrong, what am I doing wrong here?

The computed result is correct. The FFT function might not
compute what you think it does, though. Read up on the various
flavours of the Fourier transform in general (there are at least
four of them), and the DFT in particular.