This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

调用fft.lib输入输出数据格式问题

输入数据存放在pInput[ ]里面,输出的幅值存放在magTest[ ]里面,调用fft.lib时是不是要对他们的数据格式进行处理,求各位专家讲解?????

for(i=0;i<N;i++)
{
acq.input=((long)pInput[i])<<16;//数据的输入格式左移16位

acq.update(&acq);
}

if (acq.acqflag==0) // If the samples are acquired
{
fft.calc(&fft);
fft.split(&fft);
fft.mag(&fft);
acq.acqflag=1; // Enable the next acquisition

for(i=0;i<N/2+1;i++)
{

magTest[i]=sqrt(mag[i]); //输出的幅值是不是也要做处理?
}
}