[Eeglablist] Plugins and bandpass FIR filtering

Andreas Widmann widmann at uni-leipzig.de
Fri Apr 22 02:55:50 PDT 2005


Dear all,

may I ask two questions?

(1)
EEGLAB does not load plugins at startup (except BIOSIG) in MATLAB R14SP2 
(7.0.4, tested under Windows and Linux, works well R14SP1). Did anybody 
else experience this problem and/or is there already a workaround?

(2)
 From my very beginning working with EEGLAB I wasn't able to do bandpass 
FIR filtering with EEGLAB. The smoothed data always were dominated by a 
single sinusoid frequency. I followed the advice from the EEGLAB bugs 
and limitations page to separate high- and lowpass filtering and this 
worked.

Now I have to filter some huge datasets and using a bandpass filter 
would save a lot of processing time (also I was a bit curious what might 
be the problem).

eegfilt uses MATLAB firls function for computing the filter weights. I 
would like to bandpass filter, e.g. 2-30 Hz with 500 Hz sampling rate. 
Following the recommendations on filter length I would need a 751 point 
filter. Thus eegfilt would call

filtwts=firls(751,[0 (1-0.15)*2/250 2/250 30/250 (1+0.15)*30/250 1], ...
[0 0 1 1 0 0]);

MATLAB computes this filter *without* giving the warning described in 
some older mailings to the list, when MATLAB can not find a good filter 
for the chosen parameters ("Warning: Matrix is close to singular or 
badly scaled.").

But when I look at the filter response with

freqz(filtwts,1);

there appears an odd almost 36 dB *amplification* around 32 Hz. My 
question is now whether one of you could give me a hint where this 
problem comes from?
[ ] This is a bug in MATLAB and should be reported to Mathworks. The
     filter should not look like this or at least a warning should be
     given.
[ ] This is a problem in EEGLAB (e.g., the calculation of the transition
     band as 0.3*crit freq is not a good choice)
[ ] The bug is in your mind and your concept of FIR filtering is
     wrong. Do not design filters with these parameters.

Thank you for your help!
Andreas
-- 
Andreas Widmann
University of Leipzig
Institute of Psychology I



More information about the eeglablist mailing list