我正在将 matlab 代码翻译为 java,但我遇到了一个问题,我不明白 matlab 中普通 X = ifft(___)
函数与 X = ifft(___ ,对称)
。 Matlab Docs他们写道:
For nearly conjugate symmetric vectors, you can compute the inverse Fourier transform faster by specifying the 'symmetric' option, which also ensures that the output is real.
这意味着 FFT 只会更快?结果是实数,没有虚部。
要在Java中使用逆FFT,我使用Apache Commons图书馆。
FastFourierTransformer fft = new FastFourierTransformer(DftNormalization.STANDARD);
X= fft.transform(X, TransformType.INVERSE); //X is a Complex Array
如果我在 Matlab 中使用对称,这会给我不同的结果。 在 matlab 中如果没有对称,我会得到相同的结果。
我的 Ifft 有什么问题吗?如何用Java计算ifft对称?
最佳答案
如果您的 X 是实数,因此您的 Y 是共轭对称的,您可以使用“对称”选项更有效地运行 fft 或 ifft。如果此前提条件不适用,则不应使用“对称”选项。也许你的 X 不是真实的,是吗?
关于java - IFFT Matlab 对称与 Java 数学公共(public)资源,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47134694/