I want to filter a .wav file in a second order low pass filtre
5 views (last 30 days)
Show older comments
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.
0 Comments
Answers (1)
Sulaymon Eshkabilov
on 28 Dec 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.
0 Comments
See Also
Categories
Find more on Digital Filter Analysis in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!