Advertisement
Guest User

Untitled

a guest
Jan 15th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scilab 0.22 KB | None | 0 0
  1. E = 10 ^ (-3)
  2. x=poly(0,"x")
  3. f = x^4 + x^2 + 2 + 3*%i
  4. x0 = 1
  5. df = derivat(f)
  6.  
  7. x1 = x0 - horner(f,x0)/horner(df,x0)
  8.  
  9. it = 1
  10. while abs(x1 - x0) > E
  11.   x0 = x1
  12.   x1 = x0 - horner(f,x0)/horner(df,x0)
  13.   it = it + 1
  14. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement