buttor band pass filter
1 view (last 30 days)
Show older comments
I build a bandpass filter with buttor for 0.8Hz to 3Hz for AC part. there are 3000 line data. and each 128 point in 1 second. So I choose the sample rate is 128. But why is it only look fine after 2 sec. form 0 to 2 it look so terrible why?
num = xlsread('Untitled 12.xls');
time = num(:,1);
signal = num(:,2);
[b, a]=butter(2, [0.8 3]/(128/2),'bandpass');
signal_disposed =filter(b,a,signal);
plot(time(128:end),signal_disposed(128:end));


0 Comments
Answers (1)
Star Strider
on 2 Dec 2015
First, I would use filtfilt here:
signal_disposed =filtfilt(b,a,signal);
Second, your signal does not look horrible. It looks as though you have about a 1 Hz signal that according to your filter design is being passed appropriately.
2 Comments
Star Strider
on 3 Dec 2015
You didn’t include your entire signal, only from 128:end. I don’t know what your entire original or filtered signal looks like.
See if using the filtfilt function gives a different result.
See Also
Categories
Find more on Signal Processing Toolbox 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!