使用biopac软件记录了心电,肌电和皮电数据后,将数据导入到eeglab中,发现,缺少event信息,也就是,EEG.event是空的,同时,在EEG.data里发现,除了记录的数据,mark信息是在多个channel中保存的,比如:第16导记录的是1,第15导记录的是2,第14导记录的是4,以此类推。如果mark是5,那么会在第16导和第14导都有记录,通过两个导的相加得到实际的mark。
以下函数可以自动将10-16导记录的mark信息转换成EEG.event, 这样就可以像脑电数据那样在EEGLAB中进行分析了
function eventMaker(savename,savepath)
%this function is for making EEG.event after importing the biopac data into
%EEGLAB with the biopac extention
%input: a string to indicate the name of the saved file after running
%this function ; a string to inciate the location to place the data
%output: an EEG .set data and .fdt data
%the function assumes that channel 10 to channel 16 are the channels to
%record event triggers; channel 10 represents 2^7, channel 11 represents
%2^6, channel 12 represents 2^5, and so forth. Event markers are the sum
%of all seven channels in a specific time points
%the result is an EEG structure with the updated EEG.event, EEG.urevent and
%EEG.enentdescription