How to filter signals properly?
Show older comments
Hi,
I have a .mat file which is given in the attachments. I'd like to apply low pass filter to it. So, I might be able to analyse it properly. For this purpose, I'd like to use designfilt() function. How can I properly construct a .m file to filter my signal?
Ts = 0.005; % Sampling Interval (s)
Fs = 1/Ts; % Sampling Frequency (Hz)
%d=designfilt('lowpassfir', 'FilterOrder', 100, 'CutoffFrequency', 20, 'SampleRate', Fs);
d=designfilt('lowpassfir','PassbandFrequency',0.25,'StopbandFrequency',0.35,'PassbandRipple',0.5,'StopbandAttenuation',65,'DesignMethod','kaiserwin');
y=filter(d,sampleSignal);
plot(x,'--');
hold on
plot(y)
Thank you.
4 Comments
Walter Roberson
on 31 Jul 2023
What is x?
Hasan Kaan Tuna
on 31 Jul 2023
whos -file sampleSignal
There is no x inside that .mat file.
Hasan Kaan Tuna
on 31 Jul 2023
Accepted Answer
More Answers (0)
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!

