-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathjaspitup_matlab.m
executable file
·164 lines (145 loc) · 6.66 KB
/
jaspitup_matlab.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
%% deal with stroopjs data for stats!
% Dorian Minors
% Created: SEP20
%
%
%% set up
close all;
clearvars;
clc;
rootdir = pwd; %% root directory - used to inform directory mappings
datadir = fullfile(rootdir,'data/pilot_5');
loadfilename = 'processed_data';
savefilename = 'rts';
load(fullfile(datadir,[loadfilename '.mat']));
savefile = fullfile(datadir,[savefilename '.txt']); %%file name
fid = fopen(savefile,'a');
%--------------------%% all rts %%-----------------------
% fprintf(fid, '%s \t %s \t %s \t %s \t %s \t %s \t %s \t %s \t %s \t %s \t %s \t %s \t \n',...
% 'colour congruent',...
% 'colour incongruent',...
% 'colour congruent falsefont',...
% 'colour incongruent falsefont',...
% 'colour congruent font',...
% 'colour incongruent font',...
% 'size congruent',...
% 'size incongruent',...
% 'size congruent falsefont',...
% 'size incongruent falsefont',...
% 'size congruent font',...
% 'size incongruent font');
%
% fprintf(fid, '%f \t %f \t %f \t %f \t %f \t %f \t %f \t %f \t %f \t %f \t %f \t %f \t \n',...
% d.results.colour_congruent(1,:)',...
% d.results.colour_incongruent(1,:)',...
% d.results.colour_congruent_falsefont(1,:)',...
% d.results.colour_incongruent_falsefont(1,:)',...
% d.results.colour_congruent_font(1,:)',...
% d.results.colour_incongruent_font(1,:)',...
% d.results.size_congruent(1,:)',...
% d.results.size_incongruent(1,:)',...
% d.results.size_congruent_falsefont(1,:)',...
% d.results.size_incongruent_falsefont(1,:)',...
% d.results.size_congruent_font(1,:)',...
% d.results.size_incongruent_font(1,:)');
%------------------------------
%--------------------%% ave rts/ies %%-----------------------
fprintf(fid, '%s \t %s \t %s \t %s \t %s \t %s \t %s \t %s \t %s \t %s \t %s \t %s \t %s \t \n',...
'subjectid',...
'colour congruent',...
'colour incongruent',...
'colour congruent falsefont',...
'colour incongruent falsefont',...
'colour congruent font',...
'colour incongruent font',...
'size congruent',...
'size incongruent',...
'size congruent falsefont',...
'size incongruent falsefont',...
'size congruent font',...
'size incongruent font');
%------------------------------------------
%--------------------%% all data %%-----------------------
% fprintf(fid,'%s \t %s \t %s \t %s \t %s \t %s \t %s \t %s \t \n',...
% 'subjectid',...
% 'rt',...
% 'accuracy',...
% 'size',...
% 'colour',...
% 'congruency',...
% 'attended feature',...
% 'stimulus type');
%------------------------------------------
%--------------------%% incong - cong rts/ies %%-----------------------
% fprintf(fid,'%s \t %s \t %s \t %s \t %s \t \n',...
% 'subjectid',...
% 'colour falsefont',...
% 'colour font',...
% 'size falsefont',...
% 'size font');
%------------------------------------------
for subj = 1:numel(d.subjects)
fprintf(1, 'working with subject %1.0f\n', subj); % print that so you can check
%--------------------%% incong - cong /rts %%-----------------------
% fprintf(fid, '%f \t %f \t %f \t %f \t %f \t \n',...
% subj,...
% d.subjects(subj).results.means(2,2)-d.subjects(subj).results.means(2,1),...
% d.subjects(subj).results.means(3,2)-d.subjects(subj).results.means(3,1),...
% d.subjects(subj).results.means(5,2)-d.subjects(subj).results.means(5,1),...
% d.subjects(subj).results.means(6,2)-d.subjects(subj).results.means(6,1));
%------------------------------------------
%--------------------%% incong - cong /ies %%-----------------------
% fprintf(fid, '%f \t %f \t %f \t %f \t %f \t \n',...
% subj,...
% d.subjects(subj).results.ies(2,2)-d.subjects(subj).results.ies(2,1),...
% d.subjects(subj).results.ies(3,2)-d.subjects(subj).results.ies(3,1),...
% d.subjects(subj).results.ies(5,2)-d.subjects(subj).results.ies(5,1),...
% d.subjects(subj).results.ies(6,2)-d.subjects(subj).results.ies(6,1));
%------------------------------------------
%--------------%% ies scores %%----------------------------
% fprintf(fid, '%f \t %f \t %f \t %f \t %f \t %f \t %f \t %f \t %f \t %f \t %f \t %f \t %f \t \n',...
% subj,...
% d.subjects(subj).results.ies(1,1),...
% d.subjects(subj).results.ies(1,2),...
% d.subjects(subj).results.ies(2,1),...
% d.subjects(subj).results.ies(2,2),...
% d.subjects(subj).results.ies(3,1),...
% d.subjects(subj).results.ies(3,2),...
% d.subjects(subj).results.ies(4,1),...
% d.subjects(subj).results.ies(4,2),...
% d.subjects(subj).results.ies(5,1),...
% d.subjects(subj).results.ies(5,2),...
% d.subjects(subj).results.ies(6,1),...
% d.subjects(subj).results.ies(6,2));
%------------------------------------------
%--------------%% ave rts %%----------------------------
fprintf(fid, '%f \t %f \t %f \t %f \t %f \t %f \t %f \t %f \t %f \t %f \t %f \t %f \t %f \t \n',...
subj,...
d.subjects(subj).results.means(1,1),...
d.subjects(subj).results.means(1,2),...
d.subjects(subj).results.means(2,1),...
d.subjects(subj).results.means(2,2),...
d.subjects(subj).results.means(3,1),...
d.subjects(subj).results.means(3,2),...
d.subjects(subj).results.means(4,1),...
d.subjects(subj).results.means(4,2),...
d.subjects(subj).results.means(5,1),...
d.subjects(subj).results.means(5,2),...
d.subjects(subj).results.means(6,1),...
d.subjects(subj).results.means(6,2));
%------------------------------------------
% for trial = 1:numel(d.subjects(subj).testdata.all(1,:))
%--------------%% all data %%----------------------------
% fprintf(fid,'%f \t %f \t %f \t %s \t %s \t %s \t %s \t %s \t \n',...
% subj,...
% d.subjects(subj).testdata.all{1,trial},...
% d.subjects(subj).testdata.all{3,trial},...
% d.subjects(subj).testdata.all{4,trial},...
% d.subjects(subj).testdata.all{5,trial},...
% d.subjects(subj).testdata.all{6,trial},...
% d.subjects(subj).testdata.all{7,trial},...
% d.subjects(subj).testdata.all{8,trial});
%------------------------------------------
% end; clear trial
end
fclose('all');