home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Borland Programmer's Resource
/
Borland_Programmers_Resource_CD_1995.iso
/
utils
/
mathstud
/
fftshift.m
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
Text File
|
1995-05-19
|
259 b
|
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