I was going through Irene's document. Not understanding how she generated event file and extracted data from event file. I see below code she mentioned. What is Trials? What below code does? can someone explain. I am bit confused.
%% FINDING EVENTS
% Trials Events RF_Re = find(Trials == 1); % Move Right Finger LF_Re = find(Trials == 2); % Move Left Finger RF_Im = find(Trials == 3); % Imagine Moving Right Finger LF_Im = find(Trials == 4); % Imagine Moving Left Finger Events_row = [RF_Re; LF_Re; RF_Im; LF_Im]; % List of events (based on counts) E = sort(Events_row); % List of events (based on counts) sorted
% Two External Buttons RightButton = find(Right == 25120); % RightButton is pressed Events_RB = RightButton*4-4; % Translate the row to time for RB_Char = {'RightButton'}; % Create 'Right Button' column RB = repmat (RB_Char, length(Events_RB),1); end R = table(Events_RB,RB); % Create a table with Right Button events
LeftButton = find(Left == 25120); % LeftButton is pressed Events_LB = LeftButton*4-4; % Translate the row to time for LB_Char = {'LeftButton'}; % Create 'Left Button' column LB = repmat (LB_Char, length(Events_LB),1); end L = table(Events_LB,LB); % Create a table with Left Button events
% OBSERVATION: Some events are not saved. There is a difference of 2506ms % between two different type of events (RF_Re and LF_Re, for example). % This means that between two values of the same event there is difference % of 10000ms. Currently, you must add this new values manually.
% Conversion of variables (From counts to time) Events_RFRe = Move_RF*4-4; % Translate MoveRF counts into time Events_LFRe = Move_LF*4-4; % Translate MoveLF counts into time Events_RFIm = Imagine_RF*4-4; % Translate ImagineRF counts into time Events_LFIm = Imagine_LF*4-4; % Translate ImagineLF counts into time
Events = [Events_RFRe; Events_LFRe; Events_RFIm; Events_LFIm]; % List of events (based on time) Events_Time = sort(Events); % Sort of the 2nd List of Events
You are referencing Irene's tutorial on "Import Events", which differs from the "Import Data" tutorial. I pointed you to the Import Data because I assumed there was some way to get from EEGLAB data format to BCILAB format.
Your best bet is to ask questions on the forum devoted to EEGLAB / BCILAB. Or possibly email Irene directly, But her tutorials are on EEGLAB only, not BCILAB. Her email on her resume,
Comments