Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.
|
|
maryam
Posts:
17
Registered:
12/25/12
|
|
Re: fftshift
Posted:
Dec 28, 2012 11:58 AM
|
|
"Greg Heath" <heath@alumni.brown.edu> wrote in message <kbinv7$4ev$1@newscl01ah.mathworks.com>... > "maryam" wrote in message <kbie5v$29n$1@newscl01ah.mathworks.com>... > > Hi dear friends, thanks for your reading > > I would like to know when a vector is transformed to Fourier domain using fftshift(fft(fftshift(s))), > > S=[t1 t2 t3 t4 ?. tn] & sampling frequency=Fr > > result vector fftshift(fft(fftshift(s))) is equal to [0 ?.. Fr] & sampling=Fr/n or [-Fr/2 ?.. Fr/2]? > > If time is bipolar and xb is defined over > > tb = dt*[ -(N-1)/2 : (N-1)/2 ] for N odd > tb = dt*[ -N/2 : N/2-1 ] for N even > > then > > x = ifftshift(xb); > > is defined over unipolar time > > t = dt*[ 0 : N-1]; > > Furthermore, > > X = fft(x); > > is defined over unipolar frequency > > f = df * [ 0 : N-1 ]: > > and > > Xb = fftshift(X); > > is defined over bipolar frequency > > fb = df*[ -(N-1)/2 : (N-1)/2 ]; for N odd > fb = df*[ -N/2 : N/2-1 ]; for N even > > When N is even, fftshift and ifftshift are equal. In general, however, they are inverses. > Therefore, in general, > > Xb = fftshift(fft(ifftshift(xb)); > > and > > xb = fftshift(ifft(ifftshift(Xb))); > > Alternate forms of the time and frequency intervals can be obtained by using the > the following dual relationships of time period T and sampling frequency Fs: > > Fs = 1/dt, T = 1/df > > dt = T/N, df = Fs/N > > t = 0: dt : T - dt; > > f = 0: df : Fs - df > > I will let you obtain the corresponding forms for tb and fb; > > Hope this helps. > > Greg ---------------------------------------------------------------- Hi thanks a lot for your reply To express clearly what I mean, I would explain my question by an example; Assume that we have S matrix as bellow:
ti=1.44e-4; to=1.48e-04; dt=1e-9; m=2*ceil(.5*(to-ti)/dt); n=linspace(0,2,600); t=ti+(0:m-1)*dt; s=zeros(600,m); for k=1:600 s(k,:)=exp(i*2*pi*10e5*sqrt(3*n(k))+i*pi*t.^2); end F=zeros(600,m); F2=F; for k=1:600 F(k,:)=fftshift(fft(fftshift(s(k,:).'))).'; end for l=1:m F2(:,1)=fftshift(fft(fftshift(F(:,l)))); end
and S matrix is transformed to Fourier domain independent twice what would be the values of frequencies on vertical & horizontal axis(from 0 to sampling frequency(fs) or from ?fs/2 to fs/2) when we want to show F & F2 matrix by ?imagesc? command?
Thanks & Best Regards
|
|
|
|