Home > marsbar > @mardo_2 > private > pr_spm_orth.m

pr_spm_orth

PURPOSE ^

recursive orthogonalization of basis functions

SYNOPSIS ^

function x = spm_orth(X)

DESCRIPTION ^

 recursive orthogonalization of basis functions
 FORMAT x = spm_orth(X)

 serial orthogionalization starting with the first column
_______________________________________________________________________
 @(#)spm_orth.m    2.1 Karl Friston 02/02/07

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function x = spm_orth(X)
0002 % recursive orthogonalization of basis functions
0003 % FORMAT x = spm_orth(X)
0004 %
0005 % serial orthogionalization starting with the first column
0006 %_______________________________________________________________________
0007 % @(#)spm_orth.m    2.1 Karl Friston 02/02/07
0008 
0009 x     = X(:,1);
0010 for i = 2:size(X,2)
0011         D     = X(:,i);
0012         D     = D - x*(pinv(x)*D);
0013         if any(D)
0014                 x = [x D];
0015         end
0016 end
0017

Generated on Sat 19-Nov-2011 16:12:40 by m2html © 2005