problems with high pass filter
arno at CERCO.UPS-TLSE.FR
Tue Jan 26 21:39:04 CET 2010
Dear Susana and Ingrid,
designing efficient filters at very low frequency can be challenging.
Below is a solution using pure Matlab code and elliptic filters for
high pass filtering at 0.1 Hz (transition bandwidth is from 0.05 to
EEG.srate is the sampling rate, EEG.nbchan, the number of data channel
and EEG.data contains the continuous data (number of channels x number
of data points). The code below requires the signal processing toolbox.
You may also notice that I detrend the data first. This is to remove
any DC offset and very slow drifts that tend to generate more
artifacts at data boundaries.
The function filtfilt applies the filter in both direction (forward
then backward) to avoid phase distortions.
Hope this helps,
[N, Wn] = ellipord(.1/(EEG.srate/2), .05/(EEG.srate/2), 0.5, 3)
[b a] = ellip(N, 0.5, 3, Wn, 'high');
for index = 1:EEG.nbchan
EEG.data(index,:) = detrend(EEG.data(index,:));
EEG.data(index,:) = filtfilt( b, a, EEG.data(index,:));
The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fieldtrip