Skip to main content
  • Description
  • Conversion function for Matlab file to EEG format.

  • Usage
  • mat2eeg(m_data, filename, m_events, str_ori_file1, str_ori_file2, s_fs, v_label, v_channel_type,v_channel_unit,varargin)
    with :

    • m_data : data matrix (1 channel per line, 1 sample per column).
    • filename : output filename (with extension) with the complete path.
    • m_events : table with the events (samples and event codes).
    • str_ori_file1 : acquisition system.
    • str_ori_file2 : acquisition place.
    • s_fs : sampling frequency (Hz).
    • v_label : name of the channels (with numbers in elec.dat).
    • v_channel_type : sensor types.
    • v_channel_unit : sensor units.
    • option :
      'Channel_Filter', v_channel_filter : filter description for each channel.


  • Fields of parameter file and example

  • Example
  • Load data with :
    [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 ('my_data.eeg', s_sample_start, s_sample_stop, v_channel_list)

    Modify your data as you want, and create new matrix m_data_new.

    Save new data in file with :
    mat2eeg(m_data_new, 'my_new_data.eeg', m_events, str_ori_file1, str_ori_file2, s_fs, v_label_selected, v_channel_type_all(v_channel_list), v_channel_unit_all(v_channel_list))

  • Comments
    • Note to INSERM U821 users : ActiCap electrode positions can be loaded from file ActiCap_elec.mat.


  • Current version
  • 1.07 10-02-2012

  • History
    • 1.04 09-08-2010 (PEA) : minor change.
    • 1.05 20-04-2011 (PEA) : sets Terminator value to 10 to have the Linux line return (when running in Windows) and fixes digital channels definition in header file.
    • 1.06 31-05-2011 (PEA) : Fixes initialization of data_out to add the 2 digital channels (didn't work with only one channel).
    • 1.07 10-02-2012 (PEA) : Fixes error printing message (with printf instead of disp).


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

  • See also
  • eeg2mat

AttachmentSize
ActiCap_Elec.mat428 bytes