%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % function reduce(roriginal,cs) % % makoto nakajima, October 11,1999 % % This routine reduce (n x n) matrix rm into (n-1x n-1) matrix rnew % using linear equation represented by cs % % This program is translated from GAUSS program of Gary Hansen % % roriginal = (n x n) matrix to be reduced by one row and column % cs = vector of parameters of a linear equation % x(n)=cs*(x(1), x(2), ... ,x(n-1)) % % locally use : n,ccs % inputs :roriginal,cs % output : rnew % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function[rnew]=reduce(roriginal,cs) n=length(roriginal); ccs=[ eye(n-1) ; cs ]; rnew=ccs'*roriginal*ccs;