Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function [y] = my_sqrt2(x0,n,a)
- %UNTITLED2 Summary of this function goes here
- % Detailed explanation goes here
- xnew=x0;
- for k=1:n
- xold=xnew;
- xnew=1/2*(xold+a/xold);
- end
- y=xnew
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement