home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C!T ROM 5
/
ctrom5b.zip
/
ctrom5b
/
WINDOWS
/
DIVERSEN
/
MATHS171
/
FFTSHIFT.M
< prev
next >
Wrap
Text File
|
1993-03-23
|
259b
|
13 lines
function y = fftshift(x)
% y=fftshift(x)
% rotates a 2D array to center the output of the FFT
% S.Halevy 7/31/92
% Copyright (c) 1992 by the MathWizards
[m,n] = size(x);
m1 = m/2;
n1 = n/2;
y=x<>[m1,n1]; % not portable to MATLAB