简体   繁体   English

在R中执行2D快速傅立叶变换

[英]Performing 2D fast fourier transform in R

I want to know how to perform 2D fft in R. I can see the function fft only but I want to do that in 2D. 我想知道如何在R中执行2f fft。我只能看到函数fft但我想在2D中执行此操作。 Is there a function available like fft2 in matlab? 在matlab中有像fft2这样的可用功能吗?

As pointed out in the comments, fft can handle single or multi-dimensional input. 正如评论中指出的那样, fft可以处理一维或多维输入。 From the docs: 从文档:

When z is a vector, the value computed and returned by fft is the unnormalized univariate Fourier transform of the sequence of values in z. 当z是向量时,由fft计算并返回的值是z中值序列的未归一化单变量傅里叶变换。 When z contains an array, fft computes and returns the multivariate (spatial) transform. 当z包含数组时,fft将计算并返回多元(空间)变换。

I think this documentation is confusing the terms (since an R array can have 1, 2, or more dimensions), but what they are trying to say is fairly clear. 我认为该文档混淆了这些术语(因为R数组可以具有1、2或更大的维数),但是他们试图说的很清楚。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM