Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!u7g2000yqm.googlegroups.com!not-for-mail
From: Rune Allnor <allnor@tele.ntnu.no>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Confusion over calculating Fourier transforms
Date: Wed, 2 Dec 2009 02:27:20 -0800 (PST)
Organization: http://groups.google.com
Lines: 18
Message-ID: <22b6e8c6-0712-4472-b223-264926e81cc5@u7g2000yqm.googlegroups.com>
References: <hf5c3c$1f5$1@fred.mathworks.com>
NNTP-Posting-Host: 77.19.24.238
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
X-Trace: posting.google.com 1259749640 17295 127.0.0.1 (2 Dec 2009 10:27:20 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Wed, 2 Dec 2009 10:27:20 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: u7g2000yqm.googlegroups.com; posting-host=77.19.24.238; 
	posting-account=VAp5gAkAAAAmkCze5hvZtMeedpZWNthI
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: news.mathworks.com comp.soft-sys.matlab:589459

On 2 Des, 10:30, "Mat Hunt" <hunt_...@hotmail.com> 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.

Rune