FANDOM


Methods include;

  • Use Gilbert-Peierls algorithm
  • Conjugate Gradients method
  • Block triangular back substitution method
  • Direct solution: x =A-1b


Gilbert-Peierls algorithm

L=I; % I=identity matrix

for k=1:N

b = A(:,k); % kth column of A

x = L \ b; % \ is Lx=b solve

U(1 : k, k) = x(1 : k);

L(k : N, k) = x(k: N)/U(k, k);

end;


x=b;

for i = 1:k-1

if x(i)~=0

for j = i+1:N

if x(j)~=0 && L(j,i)~=0

x(j) = x(j) - L(j,i)*x(i);

end;

end;

end;

end;

x1 = x;

x = U\x1;

Community content is available under CC-BY-SA unless otherwise noted.