How to use Newton-Raphson for numerical solution of two variables?
    7 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
Hello community,
I have a non-linear function f(x,y), which I would like to find the roots of with the Newton-Raphson method. However, I haven't yet found a simple code on the internet in case of two variables, which just lets me enter my function and get the result. If I find one, the solutions on the internet always need two equations, but I only have one?
2 comentarios
Respuestas (2)
  Matt J
      
      
 el 8 de Sept. de 2013
        Can i divide it into a real and an imaginary equation
You could just rewrite your function to return a 2x1 vector containing the real and imaginary part respectively.
If f() is your existing function, you could also do
 f_new=[real(f(x,y)); imag(f(x,y))]
7 comentarios
  Jonas
 el 8 de Sept. de 2013
        2 comentarios
  Matt J
      
      
 el 8 de Sept. de 2013
				
      Editada: Matt J
      
      
 el 8 de Sept. de 2013
  
			Floating point errors probably. You have very large coefficients and also a rather large polynomial order. ROOTS might give you a more exact result (and is more appropriate anyway seeing as your function is a polynomial), but it's hard to say.
Ver también
Categorías
				Más información sobre Systems of Nonlinear Equations en Help Center y File Exchange.
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

