Home > vbmeg > external > mne > mne_write_events.m

mne_write_events

PURPOSE ^

SYNOPSIS ^

function mne_write_events(filename,eventlist)

DESCRIPTION ^

 mne_write_events(filename,eventlist)

 Write an event list into a fif file

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function mne_write_events(filename,eventlist)
0002 %
0003 % mne_write_events(filename,eventlist)
0004 %
0005 % Write an event list into a fif file
0006 %
0007 
0008 %
0009 %   Author : Matti Hamalainen, MGH Martinos Center
0010 %   License : BSD 3-clause
0011 %
0012 %   Revision 1.2  2008/10/31 13:07:05  msh
0013 %   Added mne_make_combined_event_file function
0014 %
0015 %   Revision 1.1  2008/06/16 17:27:50  msh
0016 %   Added mne_read_events and mne_write_events functions
0017 %
0018 
0019 global FIFF;
0020 if isempty(FIFF)
0021     FIFF = fiff_define_constants();
0022 end
0023 
0024 me='MNE:mne_write_events';
0025 
0026 eventlist = reshape(eventlist',numel(eventlist),1);
0027 %
0028 %   Start writing...
0029 %
0030 fid  = fiff_start_file(filename);
0031 
0032 fiff_start_block(fid,FIFF.FIFFB_MNE_EVENTS);
0033     fiff_write_int(fid,FIFF.FIFF_MNE_EVENT_LIST,eventlist);
0034 fiff_end_block(fid,FIFF.FIFFB_MNE_EVENTS);
0035 
0036 fiff_end_file(fid);

Generated on Mon 22-May-2023 06:53:56 by m2html © 2005