Implementing Notch filter for an audio signal
Afficher commentaires plus anciens
Hello, I have the folowing filter expressed as an equasion

If you put in Exel for example values from 0khz to 15khz in 1Hz increments, you get a response that looks like this

WolfranAlpha draws it like this: https://www.wolframalpha.com/input?i=%281+%2B+i*6.4*f%29+%2F+%285+%2B+i*6.4*f%29
Now when I wanted to implement this in matlab, and used this audio sample: https://transfer.sh/ruffRk/test.wav
[y,Fs] = audioread('test.wav');
filtered = (1+1i*6.4*y)/(5+1i*6.4*y);
sound(filtered,Fs);
I got the folowing error
Error using /
Requested 3888467x3888467 (225308.2GB) array exceeds maximum array size
preference (32.0GB). This might cause MATLAB to become unresponsive.
Now I don't know how to implement this notch filter properly in matlab, I guess its just requires too much RAM, that I don't have or is there any other way?
Thanks for Anwsering and Best Regards
6 commentaires
Scott MacKenzie
le 10 Avr 2022
What frequency are you trying to filter out? Have you tried using one of MATLAB's filter functions, such as bandstop?
Mitja Kocjancic
le 10 Avr 2022
Scott MacKenzie
le 10 Avr 2022
I'm not sure how to set this up, based on the formula and images you've posted. There are some STAFF and MVP contributors that are quite knowledgeable on this. Hopefully, one of them will weigh in with some suggestions. Good luck.
Mathieu NOE
le 11 Avr 2022
hello
maybe I'm wrong, but seems to me that the modulated signal must simply goes through a one pole one zero filter
(for me j*f = p /(2*pi) , p being the Laplace variable)
so this filter can be rewritten as K(p) = (1+6.4/(2*pi)*p ) / (5 + 6.4/(2*pi) *p)
num = [6.4/(2*pi) 1];
den = [6.4/(2*pi) 5];
you can then discretize this filter using bilinear or c2dm to filter your audio file
Mitja Kocjancic
le 12 Avr 2022
Mathieu NOE
le 13 Avr 2022
My pleasure !
Réponses (0)
Catégories
En savoir plus sur Audio Processing Algorithm Design dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

