I am attempting to implement an iir filter, y[n]-0.25y[n-2]= x[n]+x[n-2], using the iir function in the filter.h file. I am getting nulls at the correct frequencies and see the correct trend of the filter, however the gain all other frequencies is significantly far from what I simulate/calculate it to be. I have tried other irr filters equations and get the same issue with gain... Does anyone have advice or can see an error in my implementation.
Thanks for any help,
The attachment is the c file for processing the block of code.