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

조회 수: 6 (최근 30일)
Juan Pablo Ruiz Florez
Juan Pablo Ruiz Florez 2021년 12월 28일
답변: Sulaymon Eshkabilov 2021년 12월 28일
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