home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 10 / 10.iso / l / l455 / 8.ddi / SIGNAL.DI$ / DFTMTX.M < prev    next >
Encoding:
Text File  |  1993-03-11  |  639 b   |  19 lines

  1. function b = dftmtx(n)
  2. %DFTMTX    Discrete Fourier transform matrix.
  3. %    DFTMTX(N) is the N-by-N complex matrix of values around
  4. %    the unit-circle whose inner product with a column vector
  5. %    of length N yields the discrete Fourier transform of the
  6. %    vector.  DFTMTX(LENGTH(X))*X is the same as FFT(X).
  7. %
  8. %    The inverse discrete Fourier transform matrix is
  9. %    CONJ(DFTMTX(N))/N.   See also FFT and IFFT.
  10.  
  11. %    C.R. Denham 7-21-88
  12. %    (c) Copyright 1988, by The MathWorks, Inc.
  13.  
  14. f = 2*pi/n;     % Angular increment.
  15. w = (0:f:2*pi-f/2).' * sqrt(-1);   % Column.
  16. x = 0:n-1;      % Row.
  17. b = exp(-w*x);  % Exponentiation of outer product.
  18.  
  19.