Path: news.mathworks.com!not-for-mail
From: "h xu" <quabla123@gmx.de>
Newsgroups: comp.soft-sys.matlab
Subject: Re: fft sign?
Date: Wed, 30 Apr 2008 12:07:01 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 29
Message-ID: <fv9nd5$9oe$1@fred.mathworks.com>
References: <fv7gge$a1d$1@fred.mathworks.com>
Reply-To: "h xu" <quabla123@gmx.de>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1209557221 9998 172.30.248.35 (30 Apr 2008 12:07:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 30 Apr 2008 12:07:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1370985
Xref: news.mathworks.com comp.soft-sys.matlab:465915


"h xu" <quabla123@gmx.de> wrote in message
<fv7gge$a1d$1@fred.mathworks.com>...
> i've written a small and simple script to test the
> fft-function of matlab that transformates exp(i*n*pi/xmax *
> x) from xmin=-xmax to xmax. that should result in a
> kronecker delta with positive amplitude with value 1... but
> for some reason the amplitude is negative for odd n,... why
> is that?
> 
> xmin=-5;
> xmax = 5;
> 
> N= 2^8;
> dx = (xmax-xmin)/N;
> x = linspace(xmin,xmax,N);
> 
> y= exp(3* i*pi/xmax *x);
> NFFT = 2^nextpow2(N);
> Y_ = fft(y,NFFT)*dx;
> q = [0:NFFT-1]/NFFT/dx*xmax*2;
> Y = Y_(1:NFFT)/dx/NFFT;
> plot(q,real(Y),'.b') 
> 
> 


hm but i want to transformate functions, that transformated
also have a imaginary part, so what do i need to do, to have
the sign right for every value?