Variance Example
- group Variance Example
Refer riscv_variance_example_f32.c
- Description:
Demonstrates the use of Basic Math and Support Functions to calculate the variance of an input sequence with N samples. Uniformly distributed white noise is taken as input.
- Algorithm:
The variance of a sequence is the mean of the squared deviation of the sequence from its mean.
This is denoted by the following equation: where,
x[n]is the input sequence,Nis the number of input samples, andx'is the mean value of the input sequence,x[n].The mean value
x'is defined as:- Block Diagram:

- Variables Description:
testInput_f32points to the input datawire1,wir2,wire3temporary buffersblockSizenumber of samples processed at a timerefVarianceOutreference variance value
- NMSIS DSP Software Library Functions Used:
riscv_dot_prod_f32()
riscv_mult_f32()
riscv_sub_f32()
riscv_fill_f32()
riscv_copy_f32()