Advertisement
pfcor

matrixInverseVector

May 28th, 2017
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Octave 0.18 KB | None | 0 0
  1. function A_inv_b = matrixInverseVector(A, b, x_init, alpha)
  2.     while norm(A*x_init - b)^2 > 1e-6,
  3.         x_init -= alpha * 2*A*(A*x_init - b);
  4.     end;
  5.     A_inv_b = x_init;
  6. end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement