Advertisement
STANAANDREY

fixed point iter

Feb 26th, 2023
1,142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.13 KB | None | 0 0
  1. function xc = fpi(g, x0, k)
  2.     x=zeros(1, k + 1);
  3.     x(1)=x0;
  4.     for i=1:k
  5.         x(i+1)=g(x(i));
  6.     end
  7.     xc=x(k + 1);
  8. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement