Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. function [y] = my_sqrt2(x0,n,a)
  2. %UNTITLED2 Summary of this function goes here
  3. % Detailed explanation goes here
  4. xnew=x0;
  5. for k=1:n
  6. xold=xnew;
  7. xnew=1/2*(xold+a/xold);
  8. end
  9. y=xnew
  10.  
  11. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement