Dear all,
trying to run a second-level analysis of fMRI data I run into an error
in the model specification step from spm_eeg_get_vc.m on line 139:
Running "Factorial design specification"
??? Subscript indices must either be real positive integers or logicals.
Looking at the code it seems this code will never be able to complete
since when i is 1, line 139 will always expand to Xind{0} and throw an
error. What am I missing? I have applied Updates_456
% loop over factors
for i = 1:SPM.eeg.Nfactors
V = {};
% loop over number of variance components per factor
for j = 1:length(Q{i})
% loop over number of already existing variance components
for k = 1:length(tmp)
% if all levels equal at this level
if length(SPM.eeg.Nlevels{i}) == 1
V{end+1} = kron(tmp{k}, Q{i}{j});
% otherwise
else
Mlevel = max(SPM.eeg.Nlevels{i});
tmp2 = [];
Nlevels = SPM.eeg.Nlevels{i};
for l = 1:length(Nlevels)
% is there one or more missing levels?
if SPM.eeg.Nlevels{i}(l) < Mlevel
% find the existing indices from Xind
L = Xind{i-1}(l, :);
--
Johan Sandblom N8, MRC, Karolinska sjh
t +46851776108 17176 Stockholm
m +46735521477 Sweden
"What is wanted is not the will to believe, but the
will to find out, which is the exact opposite"
-- Bertrand Russell
|