Home > marsbar > @mardo > unfiltered_efficiency.m

unfiltered_efficiency

PURPOSE ^

Calculate unfiltered efficiency for given SPM design and contrast

SYNOPSIS ^

function e = unfiltered_efficiency(D, Ic)

DESCRIPTION ^

 Calculate unfiltered efficiency for given SPM design and contrast

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

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

Generated on Wed 11-May-2022 16:26:09 by m2html © 2003-2019