-
Notifications
You must be signed in to change notification settings - Fork 0
/
create_listparadigms.m
72 lines (57 loc) · 1.42 KB
/
create_listparadigms.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
%function create_listparadigms(dlist)
%create_listparadigms(dlist)
% cretae list of indices for all the different paradigms in dlist
%
%
% Corentin Massot
% Cognition and Sensorimotor Integration Lab, Neeraj J. Gandhi
% University of Pittsburgh
% created 01/22/2017 last modified 01/22/2017
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%set paths
[root_path data_path save_path]=set_paths;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%get data
datalist=load_data_gandhilab(data_path);
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%analyzing data
dlist=get_dlist;
data=[];info=[];
vg=[];
mg=[];
vg_A=[];
mg_A=[];
step=[];
gap=[];
for d=dlist
%get data and info
info.datafile=datalist{d};
load ([data_path info.datafile]);
display(info.datafile)
%getting trial type
trialtype=char(data(1).sequence{1});
trialtype_supp=char(data(1).sequence{4});
switch trialtype
case 'DelaySacc'
vg=[vg d];
case 'NoPuff_Overlap'
vg=[vg d];
case 'DelaySaccMem'
mg=[mg d];
case 'DelaySacc-A'
vg_A=[vg d];
case 'DelaySaccMem-A'
mg_A=[mg d];
case 'Step_basic'
step=[step d];
case 'Gap'
if isempty(trialtype_supp)
gap=[gap d];
end
end
end
vg
mg
step
gap