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

6 次查看(过去 30 天)
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.

回答(1 个)

Sulaymon Eshkabilov
Sulaymon Eshkabilov 2021-12-28
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.

类别

Help CenterFile Exchange 中查找有关 Digital Filter Analysis 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by