主要内容

FFTn

N-D快速傅立叶变换

Description

example

Y = fftn(X)returns the多维傅立叶变换一个N-D array using a fast Fourier transform algorithm. The N-D transform is equivalent to computing the 1-D transform along each dimension ofX。输出Y大小与X

example

Y = fftn(X,sz)truncatesXor padsXwith trailing zeros before taking the transform according to the elements of the vectorsz。Each element ofszdefines the length of the corresponding transform dimensions. For example, ifXis a 5-by-5-by-5 array, thenY = fftn(X,[8 8 8])pads each dimension with zeros resulting in an 8-by-8-by-8 transformY

Examples

collapse all

You can use theFFTnfunction to compute a 1-D fast Fourier transform in each dimension of a multidimensional array.

Create a 3-D signalX。的大小Xis 20-by-20-by-20.

x = (1:20)'; y = 1:20; z = reshape(1:20,[1 1 20]); X = cos(2*pi*0.01*x) + sin(2*pi*0.02*y) + cos(2*pi*0.03*z);

Compute the 3-D Fourier transform of the signal, which is also a 20-by-20-by-20 array.

y = fftn(x);

PadXwith zeros to compute a 32-by-32-by-32 transform.

m = nextpow2(20); Y = fftn(X,[2^m 2^m 2^m]); size(Y)
ans =1×332 32 32

Input Arguments

collapse all

输入数组,指定为矩阵或多维数组。如果Xis of typesingle, thenFFTn本地计算以单个精度计算,并且Yis also of typesingle。否则,Yis returned as typedouble

Data Types:double|single|int8|INT16|INT32|uint8|UINT16|uint32|logical
Complex Number Support:Yes

Length of the transform dimensions, specified as a vector of positive integers. The elements ofszcorrespond to the transformation lengths of the corresponding dimensions ofXlength(sz)must be at leastndims(X)

Data Types:single|double|int8|INT16|INT32|uint8|UINT16|uint32|logical

More About

collapse all

N-D Fourier Transform

离散的傅立叶变换Y一个N-d数组Xis defined as

Y p 1 , p 2 , 。。。 , p N = j 1 = 0 m 1 1 ω m 1 p 1 j 1 j 2 = 0 m 2 1 ω m 2 p 2 j 2 。。。 j N m N 1 ω m N p N j N X j 1 , j 2 , 。。。 , j N

Each dimension has lengthmkfork= 1,2,...,N, 和 ω m k = e 2 π i / m k 是统一的复杂根源iis the imaginary unit.

Extended Capabilities

Version History

在R2006a之前引入

See Also

|||