LIBML
Version 3.2.4
LIBML DSP Software Library
|
Functions | |
void | tpt_var_f32 (f32_t *aResult, const f32_t *aInData, uint32_t aCount) |
Variance of the elements of a floating-point vector. More... | |
void | tpt_var_q15 (q15_t *aResult, const q15_t *aInData, uint32_t aCount) |
Variance of the elements of a Q15 vector. More... | |
void | tpt_var_q31 (q31_t *aResult, const q31_t *aInData, uint32_t aCount) |
Variance of the elements of a Q31 vector. More... | |
Calculates the variance of the elements in the input vector. The underlying algorithm used is the direct method sometimes referred to as the two-pass method:
Result = ((aInData[0] - meanOfElements)2 + (aInData[1] - meanOfElements)2 + ... + (aInData[aCount - 1] - meanOfElements)2) / (aCount - 1) meanOfElements = (aInData[0] + aInData[1] + ... + aInData[aCount-1] ) / aCount
There are separate functions for floating point, Q31, and Q15 data types.
Variance of the elements of a floating-point vector.
[out] | aResult | variance value returned here |
[in] | aInData | points to the input vector |
[in] | aCount | number of samples in input vector |
Variance of the elements of a Q15 vector.
[out] | aResult | variance value returned here |
[in] | aInData | points to the input vector |
[in] | aCount | number of samples in input vector |
Variance of the elements of a Q31 vector.
[out] | aResult | variance value returned here |
[in] | aInData | points to the input vector |
[in] | aCount | number of samples in input vector |