Skip to main content
  • Description
  • Conversion function for Elan EEG files (.eeg and .eeg.ent) to Matlab.

  • Usage
  • [m_data,m_events,v_label_selected,s_fs,s_nb_samples_all,s_nb_channel_all,v_label_all,v_channel_type_all,v_channel_unit_all,str_ori_file1,str_ori_file2] = eeg2mat(filename,s_sample_start,s_sample_stop,v_channel_list,varargin)
    with :

    • filename : input filename (with extension) with the complete path.
    • s_sample_start : sample number at the beginning of reading window (1 to start at the first sample).
    • s_sample_stop : sample number at the end of the reading window ('all' to select all samples after s_sample_start).
    • v_channel_list : vector of selected channels (rank in the eeg file) ('all' to select all channels).
    • option :
      'save', mat_name : to save all the results in a .mat file named mat_name.mat .

    output :

    • m_data : data recorded by the selected channels (units as in the .eeg file), 1 channel per line, 1 sample per column.
    • m_events : table with the events (samples and event codes).
    • v_label_selected : name of the selected channels.
    • s_fs : sampling frequency (Hz).
    • s_nb_samples_all : total number of samples per channel in eeg file.
    • s_nb_channel_all : total number of channels.
    • v_label_all : name of all channels (with numbers in elec.dat).
    • v_channel_type_all : sensor types (EEG, MEG, ...).
    • v_channel_unit_all : sensor units (µV, fT, ...).
    • str_ori_file1 : acquisition system.
    • str_ori_file2 : acquisition place.


  • Fields of parameter file and example

  • Example
  • See example of mat2eeg.


  • Comments

  • Current version
  • 1.05 09-08-2010

  • History
    • 1.05 09-08-2010 (PEA) : minor change.


  • Files
  • $ELANPATH/misc/matlab/eeg2mat.m

  • See also
  • mat2eeg