由于您的输入是真实的,FFT 的输出将关于 N / 2 对称,因此您可以只查看前 N / 2 个 bin,并将幅度缩放 2 倍。对于相位,您理想情况下需要一个 atan2 函数,该函数采用实部和虚部作为单独的参数并返回 4 象限结果。
Since your input is real the output of the FFT will be symmetric about N / 2 so you can just look at the first N / 2 bins and scale the magnitude by a factor of 2. For the phase you ideally need an atan2 function which takes the real and imaginary components as separate arguments and returns a 4 quadrant result.
发布评论
评论(1)
由于您的输入是真实的,FFT 的输出将关于 N / 2 对称,因此您可以只查看前 N / 2 个 bin,并将幅度缩放 2 倍。对于相位,您理想情况下需要一个 atan2 函数,该函数采用实部和虚部作为单独的参数并返回 4 象限结果。
Since your input is real the output of the FFT will be symmetric about N / 2 so you can just look at the first N / 2 bins and scale the magnitude by a factor of 2. For the phase you ideally need an atan2 function which takes the real and imaginary components as separate arguments and returns a 4 quadrant result.