Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function xc=secanta(f,x0,x1,k)
- x(1)=x0;
- x(2)=x1;
- for i=2:k
- x(i+1)=x(i)-(f(x(i))*(x(i)-x(i-1)))/f(x(i))-f(x(i-1))
- end
- xc=x(k+1);
- %in matlab incepi de la 1 cu indexarea
- %x(i) e practic vectorul *x
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement