Linear Interpolate Example
- group Linear Interpolate Example
NMSIS DSP Software Library Linear Interpolate Example
Description This example demonstrates usage of linear interpolate modules and fast math modules. Method 1 uses fast math sine function to calculate sine values using cubic interpolation and method 2 uses linear interpolation function and results are compared to reference output. Example shows linear interpolation function can be used to get higher precision compared to fast math sin calculation.
Refer riscv_linear_interp_example_f32.c
- Block Diagram:


- Variables Description:
testInputSin_f32points to the input values for sine calculationtestRefSinOutput32_f32points to the reference values caculated from sin() matlab functiontestOutputpoints to output buffer calculation from cubic interpolationtestLinIntOutputpoints to output buffer calculation from linear interpolationsnr1Signal to noise ratio for reference and cubic interpolation outputsnr2Signal to noise ratio for reference and linear interpolation output
- NMSIS DSP Software Library Functions Used:
riscv_sin_f32()
riscv_linear_interp_f32()