[Eeglablist] Plugins and bandpass FIR filtering

Arnaud Delorme arno at salk.edu
Fri Apr 22 18:35:25 PDT 2005


> (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?

I do not know why this is happenning and since we do not have this 
version of Matlab yet, we cannot work on it. If someone finds the bug, 
please let us know.

> (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.

We struggled a lot with this problem and did not come to a definite 
answer. If someone has it, please let us know. As far as filtering 
faster, you may use the IIR filtering plugin for EEGLAB (it distorts 
angle relashionships of different frequencies so if you are interested 
in studying across frequency phase synchronization, it should not be used).

Arno





More information about the eeglablist mailing list