When xb is defined over the "centered" bipolar time
interval
tb = t - dt*ceil((N-1)/2);
= dt*[-ceil((N-1)/2) : floor((N-1)/2))];
the location of the negative time components can be
periodically shifted N units into the proper positive
time interval location by using ifftshift
x = ifftshift(xb);
and recovered by using the inverse fftshift
xb = fftshift(x);
X = fft(x) yields a transform with a spectral
period Fs (discrete frequency period N) that is
defined over the nonnegative frequency interval
f = df*(0:N-1);
f = 0:df:Fs-df;
f = linspace(0,Fs-df,N);
where
df = 1/T = Fs/N
Xb, the "centered" bipolar frequency transform
defined over the spectral interval
fb = f - df*ceil((N-1)/2)
= df*[-ceil((N-1)/2) : floor((N-1)/2))];
is obtained by using fftshift
Xb = fftshift(X)
and X is recovered using ifftshift
X = ifftshift(Xb)
If a time signal xb is defined over the
centered bipolar time interval and is
filtered using a transform, Hb, that is defined
over the centered bipolar frequency interval,
the resulting output, yb can be obtained in 7
steps:
xb => x => X => Xb => Yb = Hb.*Xb => Y
=> y => yb
which, of course are typically combined by the
experienced user.
Note that ifftshift is identical to fftshift
when N is even
Hope this helps.
Greg
Ok Greg, now we know what the answer is, what was the question? ;-)
Regards
Dave Robinson
The question is posed in
Newsgroups: comp.soft-sys.matlab
From: "Nicolas " <nico_spect...@hotmail.com>
Date: Sat, 15 May 2010 00:36:04 +0000 (UTC)
Local: Fri, May 14 2010 8:36 pm
Subject: FFT-filter-IFFT problem
http://groups.google.com/group/comp.soft-sys.matlab/msg/5ea90824ec15e2f5?hl=en
My reply to him was to refer to this thread.
Since many other posters have had problems with MATLAB
concerning
a. negative times and frequencies using fft/ifft
b. zero matrix indices
c. ifftshift vs fftshift
I felt that this was the best way to respond.
Hope this helps.
Greg