Hi SPMers,
I am trying to run a single subject, four condition FDG-PET analysis. I have specified the following in Factorial Design Specification:
Design: one-way ANOVA within-subject
Scans: Dependency > Normalised Images Subject 1
Conditions: [4 3 1 2] %this was the order that the 4 experimental conditions were presented
All other options were left as default
I have received the following error:
Running 'Factorial design specification'
Failed 'Factorial design specification'
Attempted to access U(2,:); index out of bounds because size(U)=[1,2].
In file "E:\WorkSpace\spm8\Running 'Factorial design specification'
Failed 'Factorial design specification'
Attempted to access U(2,:); index out of bounds because size(U)=[1,2].
In file "E:\WorkSpace\spm8\spm_design_within_subject.m" (v4178), function "spm_design_within_subject" at line 69.
In file "E:\WorkSpace\spm8\config\spm_run_factorial_design.m" (v4537), function "spm_run_factorial_design" at line 467.
The following modules did not run:
Failed: Factorial design specification
I have looked at line 69 of spm_design_within_subject.m and cannot decipher what I have done wrong. The error within spm_run_factorial_design.m appears to be due to the first error.
%--------------------------------------------------------------------------
%-Re-order scans conditions and covariates into standard format
% This is to ensure compatibility with how variance components are created
%--------------------------------------------------------------------------
if subject_factor
U=unique(I(:,2:nf+1),'rows');
Un=length(U);
Uc=zeros(Un,1);
r=1;rj=[];
for k=1:Un
for j=1:size(I,1)
match=sum(I(j,2:nf+1)==U(k,:))==nf; <--------------------- line 69
if match
Uc(k)=Uc(k)+1;
Ir(r,:)=[Uc(k),I(j,2:end)];
r=r+1;
rj=[rj;j];
end
end
end
P=P(rj); % -scans
I=Ir; % -conditions
for k=1:numel(cov) % -covariates
cov(k).c = cov(k).c(rj);
end
end
%-Pad out factorial matrix to cover the four canonical factors
%--------------------------------------------------------------------------
Any assistance would be greatly appreciated.
Cheers,
Natalie
|