Hey guys! I'm fairly new with signal processing in matlab. I have some labdata that are corrupted by noise. I would like to make a (butterworth) bandpass filter between approx. 0.5 kHz and 1.5 kHz. I have tried a lot of different approaches from browsing the net. My latest attempt looks like this:
load('filtest1000hz.txt');
time=filtest1000hz(:,1);
volin=filtest1000hz(:,2);
volout=filtest1000hz(:,3);
load('filtestspectrum1000hz.txt');
freq=filtestspectrum1000hz(:,1)*10^3;
powin=filtestspectrum1000hz(:,2);
powout=filtestspectrum1000hz(:,3);
fs=10*10^(3);
inputsig=powin;
order=2;
fcutlow=0.1;
fcuthigh=1.7;
[b,a]=butter(order,[fcutlow,fcuthigh]/(fs/2),'bandpass');
filtsig=filter(b,a,inputsig);
This is the output i get (3rd subplot) when i plot the "filtsig" vs. the frequency (freq). You can see the original spectrum (intended) but the filtered spectrum does not even show up:
and this is the format of my data from the time series and the spectrum (input channel and output channel):
I have spend a lot of hours trying to figure out how to do the bandpass properly. Can some of you figure out what is wrong?
Kind regards
0 Comments
Sign in to comment.