-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlstProcess.m
47 lines (33 loc) · 1.41 KB
/
lstProcess.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
function [meanWinCells,meanLosCells,lstWin,lstLos,xPnts]=lstProcess(EEG,llst,winLength)
%--------------------------------------------------------------------------
% lstProcess.m
% Last updated: Feb 2024, John LaRocco
% Ohio State University
% Details: Extract features for LST (doors).
% Input Variables:
% EEG: Struct of EEG from EEGLAB.
% lst: cell of inputs from Log files.
% winLength: Window length in seconds.
% Output Variables:
% totalErnAccuracy: Accuracy from task.
% incErnRts/corErnRts: Vector array of (incorrect/correct) response times codes in ms.
% lstWin/lstLos: Mean EEG from response times from (all/error/correct).
% ernEpochCells/crnEpochCells: Cell structs from (win/loss) cells.
% xPnts: vector to plot EEG with.
%--------------------------------------------------------------------------
%winLength=1;
eventCodes=[6];
eventCodes=[11];
[~,meanWinCells,indexPnts,sTimes,ernCodes,ernTimeStamps,ernRts]=soarEventEpochs(EEG,eventCodes,llst,winLength);
lstWin=mean(meanWinCells);
eventCodes=[7];
eventCodes=[12];
[~,meanLosCells,indexPnts,sTimes,ernCodes,ernTimeStamps,ernRts]=soarEventEpochs(EEG,eventCodes,llst,winLength);
lstLos=mean(meanLosCells);
xPnts=linspace(0,1,length(lstWin));
%splName='STUDY_headplot.spl';
%xx = readlocs('Standard-10-10-Cap47.ced');
%headplot('setup', xx, splName)
%figure;
%headplot(EEG.data, splName)
end