% scoring for "correct task performance" hypothesis
% sensible for color; no change required
if stim_order(i) <= 4
R(1,i) = -1;
else
R(1,i) = 1;
end
% scoring for "modulating standard" hypothesis, window = 1
% sensible for color; some change required
if i==1
R(2,i) = R(1,i);
else
if test_nums(stim_order(i)) > test_nums(stim_order(i-1))
R(2,i) = 1;
elseif test_nums(stim_order(i)) < test_nums(stim_order(i-1))
R(2,i) = -1;
else
R(2,i) = 0;
end
end
% scoring for "modulating standard" hypothesis, window = 3
% not sensible for color
if i==1
R(3,i) = R(1,i);
else
if i < 4
current_std = (running_total(i-1)+(4-i)*20)/3;
else
current_std = (test_nums(stim_order(i-1))+test_nums(stim_order(i-2))+test_nums(stim_order(i-3)))/3;
end
if test_nums(stim_order(i)) > current_std
R(3,i) = 1;
elseif test_nums(stim_order(i)) < current_std
R(3,i) = -1;
else
R(3,i) = 0;
end
end
% scoring for "compensating for previous responses" hypothesis
% sensible for color; no change required
if i==1
R(4,i) = R(1,i);
else
if sum(R(4,1:i)) < 0
R(4,i) = 1;
elseif sum(R(4,1:i)) > 0
R(4,i) = -1;
else
if stim_order(i) <= 4
R(4,i) = -1;
else
R(4,i) = 1;
end
end
end
end
orthogonality = sum(sum(sqrt(1-corrcoef(R'))));
if orthogonality > best_orth
best_orth = orthogonality;
best_sequence = stim_order;
best_R = R';
end
end