home *** CD-ROM | disk | FTP | other *** search
/ Borland Programmer's Resource / Borland_Programmers_Resource_CD_1995.iso / utils / mathstud / fftshift.m < prev    next >
Encoding:
Text File  |  1995-05-19  |  259 b   |  13 lines

  1. function y = fftshift(x)
  2. % y=fftshift(x)
  3. % rotates a 2D array to center the output of the FFT
  4.  
  5. %       S.Halevy 7/31/92
  6. %       Copyright (c) 1992 by the MathWizards
  7.  
  8. [m,n] = size(x);
  9. m1 = m/2;
  10. n1 = n/2;
  11. y=x<>[m1,n1];    % not portable to MATLAB
  12.  
  13.