Dear SPM-List,
I am sorry about asking trivial Matlab issues, but I have no idea what is going wrong. I’d like to calculate the design efficiency with following routine:
cs={[0 -1 1],[0 0 0 0 -1 1]};
figure;
for d = 1:1
load('D:\fMRI\DesignEfficiency\Pain_Suggestion\Pain_Suggestion1\SPM.mat');
X = SPM.xX.xKXs.X;
subplot(1,1,d);plot(X); hold all
plot(X(:,1)-X(:,2)+0.5);
for n = 1:2
c = cs{n}';
eff(d, n) = 1/(c'*pinv(X'*X)*c);
end
end
However, Matlab returns the error:
??? Error using ==> mtimes
Inner matrix dimensions must agree.
Error in ==> compute_efficiency at 21
eff(d, n) = 1/(c'*(X'*X)*c);
Can someone help me?
Thank you very much!
|