Calculate unfiltered efficiency for given SPM design and contrast
0001 function e = unfiltered_efficiency(D, Ic) 0002 % Calculate unfiltered efficiency for given SPM design and contrast 0003 0004 if nargin < 2 0005 error('Need design and contrast number'); 0006 end 0007 if ~has_contrasts(D) 0008 error('Need design with contrasts'); 0009 end 0010 0011 % Get contrast matrix to test for 0012 xCon = get_contrasts(D); 0013 con = xCon(Ic).c; 0014 0015 X = design_matrix(D); 0016 e = 1 / trace(con' * pinv(X' * X) * con); 0017 return