I'm using C language to implepement a simple 4th order lowpass IIR filter. I used ellip on matlab to get my coefficients,more specifically ellip(4,0.25,10,0.25). This is the frequency response on matlab.
Since my sampling rate is at 48KHz the filter should cut off frequencies above 6KHz.
Low frequencies seem to pass with mild decrease while frequencies above 6 KHz are not completely cut off until about 11KHz although there is a sensible decrease above 6KHz. Is this to be expected or should I start looking at my code?
UPDATE: I haven't heard about passband ripple and stopband attenuation before. I just had a look at this question : what's the pass band ripple and stop band attenuation of a digital filter?
So now my main focus is to understand ellip. We have 0.25 dB passband so the small decrease in frequencies below 6 KHz makes sense( if I'm connecting this right). We also have 10dB stopband attenuation which justifies the high values for high frequencies. But why does the stopband attenuation stop at very high frequencies? Do passband and stopband ripple apply for frequencies only close to the 'cut-off' frequency?