Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //// Ecuacion 1
- function f=u(x,y,z)
- f = 3*x-cos(y*z)-1/2;
- endfunction
- //// Ecuacion 2
- function f=v(x,y,z)
- f = x^2-81*(y+0.1)^2+sin(z)+1.06;
- endfunction
- //// Ecuacion 3
- function f=w(x,y,z)
- f = exp(-x*y)+20*z+(10*%pi-3)/3;
- endfunction
- //
- //// Resultados
- x0 = [1.5;1.5; 1.5];
- [x,f,ea,iter]=NewtonRaphson2(u, v, w, x0, 0.0001, 50)
- iter =
- 12.
- ea =
- 1.026D-09
- f =
- 0.
- 5.134D-11
- -9.059D-13
- x =
- 0.5
- -3.176D-12
- -0.5235988
- x0 = [5; 2; 1];
- [x,f,ea,iter]=NewtonRaphson2(u, v, w, x0, 0.0001, 30)
- iter =
- 9.
- ea =
- 6.170D-09
- f =
- -5.107D-14
- -1.865D-10
- -6.400D-10
- x =
- 0.5
- 9.811D-12
- -0.5235988
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement