IFFT Matlab symmetric vs Java math commons

随声附和 提交于 2019-12-08 12:43:40

问题


iam translating matlab code to java and i have a problem where i dont understand the difference betweent a normal X = ifft(___)function in matlab compared to a X = ifft(___,symmetric) . Matlab Docs they write:

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.

That means the FFT is only faster? and the result ist real without imaginary part.

To use the Inverse FFT in Java i use the Apache Commons Library.

 FastFourierTransformer  fft = new FastFourierTransformer(DftNormalization.STANDARD);

        X= fft.transform(X, TransformType.INVERSE); //X is a Complex Array

This gives me different results if i use the symmetric in Matlab. Without symmetric in matlab i have the same result.

what is wrong with my Ifft? How to calculate the ifft symmetric with Java?


回答1:


If your X is real and thus your Y is conjugate symmetric you can use the "symmetric" option to run fft or ifft more efficiently. You are not supposed to use "symmetric" option if this precondition doesn't apply. Probably your X is not real, is it?



来源:https://stackoverflow.com/questions/47134694/ifft-matlab-symmetric-vs-java-math-commons

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!