3

I have some raw EEG data in csv files captured using Emotiv EPOC as part of experiments I am doing for my undergrad thesis. I uploaded one of the files here for reference. I wish to perform band pass filtering on the data in the certain bands

  • delta (1-4Hz)
  • theta (4-8Hz)
  • alpha (8-13Hz)
  • beta (13-30Hz)
  • and gamma (36- 40Hz)

As I am relatively new in Matlab, how can I do that? I am aware that similar questions already exist but they do not apply in my case as I am using Emotiv EPOC for EEG data capturing

Maxime Lorant
  • 34,607
  • 19
  • 87
  • 97
John Demetriou
  • 4,093
  • 6
  • 52
  • 88
  • Is your question about importing the data into MATLAB, interfacing to your third-party software, designing the filters in MATLAB or filtering the data with existing filters (in MATLAB)? If it relates to designing the filters, do you have the Signal Processing Toolbox and the DSP System Toolbox? – am304 Oct 16 '13 at 13:50
  • My question includes importing data and filtering it, but it was answered below, thanks – John Demetriou Oct 16 '13 at 16:07

1 Answers1

2

You may try to use EEGLab, an open source environment for electrophysiological signal processing with matlab. This toolbox accepts text input such as yours, and has several filtering method like

function EEGfiltered = eeg_filter(EEGinput,sample_freq,lcf,hcf,order);

% eeg_filter - apply a butterworth polynomial filter
% 
%   Usage : EEGfiltered = eeg_filter(EEGinput,sample_freq,lcf,hcf,order)
%
%   - input arguments 
%       EEGinput    : eeg data - M samples x N channels x P epochs
%       sample_freq : sampling frequency
%       lcf         : low cutoff frequency (highpass, default 0.01)
%       hcf         : high cutoff frequency (lowpass, default 40)
%       order       : butterworth polynomial order (default 2)
%
%   - output argument
%       EEGfiltered : filtered EEGinput;

Beware of the specificity of EEG data processing. For example, the filtfilt function baselines on the last point of the timeseries, so it is necessary to call eeg_baseline after filtering. Following the EEGLab tutorial will avoid many drawbacks.

marsei
  • 7,691
  • 3
  • 32
  • 41