I want to filter a .wav file in a second order low pass filtre

5 vues (au cours des 30 derniers jours)
Juan Pablo Ruiz Florez
Juan Pablo Ruiz Florez le 28 Déc 2021
I need to filtre, an audio filtre torought a low pass system. I have this code so far:
y=audioread('hfnoise.wav');
plot(y);
sound(y);
w_n = 2*pi*600;
Z = 2;
s = tf('s');
G = (w_n^2)/(s^2 + 2*Z*w_n*s + w_n^2);
bode(G);
u = reshape(y,[1,24440]);
t=1:1:24440;
p=lsim(G,u,t);
plot(p)
The signal doesn't change by passing torought the filter. The .wav file is a double of 1x24440. The filtering must be done using lsim. Help, please!
Thank you.

Réponses (1)

Sulaymon Eshkabilov
Sulaymon Eshkabilov le 28 Déc 2021
Note that lsim() is not a filter. It is a simulated time response of dynamic system to arbitrary inputs; simulated response data.
Here lsim () is working correctly and thus, you'd needd to employ filter() to filter out the undesired noises from your signal y.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by