S0704082 发表于 2008-8-10 20:55

二维离散傅里叶变换的实用

二维离散傅里叶变换如何用
function f = fft2(x, mrows, ncols)
%FFT2 Two-dimensional discrete Fourier Transform.
%   FFT2(X) returns the two-dimensional Fourier transform of matrix X.
%   If X is a vector, the result will have the same orientation.
%
%   FFT2(X,MROWS,NCOLS) pads matrix X with zeros to size MROWS-by-NCOLS
%   before transforming.
%
%   See also IFFT2, FFT, FFTSHIFT.
%   J.N. Little 12-18-85
%   Revised 4-15-87 JNL
%   Revised 5-3-90 CRD
%   Copyright 1984-2002 The MathWorks, Inc.
%   $Revision: 5.13 $$Date: 2002/06/05 17:06:40 $
if ndims(x)==2
    if nargin==1
      f = fftn(x);
    else
      f = fftn(x,);
    end
else
    if nargin==1
      f = fft(fft(x,[],2),[],1);
    else
      f = fft(fft(x,ncols,2),mrows,1);
    end
end   

请教mrows和ncols是具体数还是一个数组?我使用行数和列数不对,请指教
页: [1]
查看完整版本: 二维离散傅里叶变换的实用