IFFT Matlab对称与Java数学共同点 [英] IFFT Matlab symmetric vs Java math commons

查看:112
本文介绍了IFFT Matlab对称与Java数学共同点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

iam将matlab代码翻译成java,我有一个问题,就是我不了解matlab中普通的X = ifft(___)函数与X = ifft(___,symmetric)之间的区别. Matlab 文档他们写道:

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:

对于几乎共轭的对称向量,您可以通过指定"symmetric"选项来更快地计算傅立叶逆变换,这也可以确保输出是真实的.

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只会更快吗?并且结果是真实的,没有虚部.

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

要在Java中使用逆FFT,我使用 Apache Commons 库.

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

如果我在Matlab中使用对称,这将给我带来不同的结果. 在Matlab中不对称,我得到的结果是相同的.

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

我的Ifft有什么问题?如何使用Java计算对称的ifft?

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

推荐答案

如果您的X是实数,因此您的Y是共轭对称的,则可以使用"symmetric"选项更有效地运行fft或ifft.如果此先决条件不适用,则不应使用对称"选项.可能您的X不是真实的,对吗?

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?

这篇关于IFFT Matlab对称与Java数学共同点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆