MATLAB: How to normalize this signal

eegfilternoisy signalpeakfinder

I have a noisy data set that I am trying to find peaks for (I am using the peakfinder function). The function works great when the baseline of the signal does not change, but when it does it no longer finds peaks well – I was thinking of filtering the data, but was unsure what kind of filter would actually help. Any help would be greatly appreciated. A sample below:

Best Answer

I suggest a low-order bandpass filter, perhaps Butterworth 3 or 4. That will eliminate your baseline drift and most of the noise, making it much easier for findpeak to work.