Advertisement
STANAANDREY

broyden2

Mar 5th, 2023
1,127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.25 KB | None | 0 0
  1. function x = broyden2(F, x0, k)
  2.     n = length(x0);
  3.     B = eye(n);
  4.     for i=1:k
  5.         x = x0 - B*F(x0);
  6.         delta = x - x0;
  7.         Delta = F(x) - F(x0);
  8.         B = B + (delta - B*Delta)*delta'*B /(delta'*B*Delta);
  9.         x0 = x;
  10.     end
  11. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement