为什么 R 中的 FFT 函数不适用于特定长度的向量?
Why FFT function in R does not work for a vector of a certain length?
我正在尝试在 R 中使用 fft 函数。现在我知道如何应用零填充来应用线性卷积。但是,对于一定长度的向量(padding后),415999,R程序无法给出结果。
x=rnorm(415999)
fft(x)
但它适用于更长的向量。
x=rnorm(515999)
fft(x)
一头雾水,希望大家多多指教
帮助文件中某处说
The FFT is fastest when the length of the series being transformed is highly composite (i.e., has many factors). If this is not the case, the transform may take a long time to compute and will use a large amount of memory.
根据我对这个答案的评论中给出的答案看看为什么。
我正在尝试在 R 中使用 fft 函数。现在我知道如何应用零填充来应用线性卷积。但是,对于一定长度的向量(padding后),415999,R程序无法给出结果。
x=rnorm(415999)
fft(x)
但它适用于更长的向量。
x=rnorm(515999)
fft(x)
一头雾水,希望大家多多指教
帮助文件中某处说
The FFT is fastest when the length of the series being transformed is highly composite (i.e., has many factors). If this is not the case, the transform may take a long time to compute and will use a large amount of memory.
根据我对这个答案的评论中给出的答案看看为什么。