Is there a True RMS Converter example project available?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Is there a True RMS Converter example project available?

499 次查看
adamgarrison
Contributor III

Is there example project available for the True RMS Converter?  There have been rumors that there is one available for the M series, but it is not available in the SDK 1.3.  I am hoping to use it on a K02.

标签 (2)
标记 (2)
0 项奖励
1 回复

360 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Adam Garrison,

    I didn't find the RMS converter in the KSDK1.3.0, so you can use the code to generate it.

    The following code is for your reference:

#include "math.h"

double calc(double* pData, int nNum)

{

    double fSum = 0;

    for(int i=0; i<nNum; ++i)

    {

        fSum += pData[i] * pData[i];

    }

    return sqrt(fSum/nNum);

}

Wish it helps you!


Have a great day,
Jingjing

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励