我在执行中使用加速框架iOS的基于加速度计的FFT,但有一点我还是有点困惑的是这一部分:
/* The output signal is now in a split real form. Use the function
* vDSP_ztoc to get a split real vector. */
vDSP_ztoc(&A, 1, (COMPLEX *) obtainedReal, 2, nOver2);
是什么最终的阵列是什么样子? 我很困惑,“分裂真正形成”和“分裂现实载体”之间的区别。 我可能会意味着什么有些了解,但我要确保我有个好主意。
起始数据,double数组,表示输入数据,诸如加速度经由vDSP_ctoz投入奇偶形式。 那么结果就是以这种形式(从苹果公司的VDSP指南复制):
{[DC,0],C[1],C[2],...,C[n/2],[NY,0],Cc[n/2],...,Cc[2],Cc[1]}
where
1. DC and NY are the dc and nyquist components (real valued),
2. C is complex in a split representation,
3. Cc is the complex conjugate of C in a split representation.
For an n size real array A, the complex results require 2n
spaces. In order to fit the 2n size result into an n size input and
since the complex conjugates are duplicate information, the real
FFT produces its results as follows:
{[DC,NY],C[1],C[2],...,C[n/2]}
在我的实现(这工作,我只是困惑的输出),我也有vDSP_ztoc通话。 如果它有这个电话,或者只在上面的例子一样,因为他们希望恢复阵列,以匹配原来的(因为他们做了一个反向转换)?
如果你应该称呼它,是什么vDSP_ztoc后的最终形态? 是吗:
{[DC,NY],C[1],C[2],...,C[n/2]}
或者是输出阵列中的第一个元素是DC,第二个是第一仓的实部的第三个是第一仓的虚部,等等? 或者是所述第二元件中的奈奎斯特频率等在该设置中,使第三和第四元件的第一仓的实分量和虚分量?
这是一个有点不清楚,但我想,这个问题是非常简单的,和所有我需要的是一个快速确认/修正。
谢谢!