Newer
Older
% function generating a design matrix
% c Daniel Nelle 2018
function designMatrix = genDesignMatrix(subjectNo, imgList)
%initialize random number generator
%Factor filter
F1LevA = 1;
F1LevB = 2;
%Factor delay
F2LevA = 0.03;
F2LevB = 0.05;
F2LevC = 0.07;
F1 = [F1LevA, F1LevB];
F2 = [F2LevA, F2LevB, F2LevC];
NREP = length(imgList);
NTRIALS = length(F1) * length(F2) * NREP;
design = NaN(NTRIALS, 5);
ID = subjectNo;
cnt = 1;
for i = 1:length(F1)
for j = 1:length(F2)