I will be using the filter coefficients generated by MATLAB in my code that will run on a microcontroller. The poor microcontroller is very bad in floating point Arithmetic. So What do I do? Shall I directly truncate all float values to nearest int? shall I do ceil? or floor? Is there any function that can automatically do this conversion for me?
Update All my filter coefficeints are coming like: 0.465, 0.76, 0.23 etc, so If I use ciel then all will become zero. What should I do now?
Actual Filter Coefficients are:
> -0.00385638
> 0.004944457
> 0.01505063
> 0.018768283
> 0.009635631
> -0.01192891
> -0.035809426
> -0.045043857
> -0.023993426
> 0.032106934
> 0.111777547
> 0.18997355
> 0.238374966
> 0.238374966
> 0.18997355
> 0.111777547
> 0.032106934
> -0.023993426
> -0.045043857
> -0.035809426
> -0.01192891
> 0.009635631
> 0.018768283
> 0.01505063
> 0.004944457
> -0.00385638