Open nicobast opened 1 year ago
okay, it happens for runs when
length(ones(length(pupilAvg(kk,:)),1)) != length(predT2(kk,:)')
while is always true:
length(predT2(kk,:)') <= length(ones(length(pupilAvg(kk,:)),1))
Or in other words, when the predicted pupil response time series is shorter than the measured pupil time series
I am just not sure, why this is the case.
I split the oddball data into different runs to estimate a change in gain over the course of the task.
However, fitModel fails for some participants on the second run (run 1, run 2). Confusingly, it does not fail for these participants, when the order of the runs is reversed (run 2, run1). I checked my script and the data in the runs remains the same, just the order is reversed. This coudl be a workaround, but then it will fail in the same manner for other participants:
This is the error message:
`Error using horzcat Dimensions of arrays being concatenated are not consistent.
Error in gainFinder (line 117) DM = [ones(length(pupilAvg(kk,:)),1), predT2(kk,:)'];
Error in fitModel (line 40) [d, temp] = gainFinder(d,ii,op); % ii index is for runs
Error in single_batch (line 4) [parameters, estimates] = fitModel(data); `
Do you have any suggestions?