Using Fsolve for 3 nonlinear equations with 3 variables.

2 visualizaciones (últimos 30 días)
Prithvi Shethia
Prithvi Shethia el 22 de Abr. de 2020
Editada: Walter Roberson el 22 de Abr. de 2020
1.) 2x^2 - 4x + y^2 + 3z^2 +6z+2 = 0;
2.) x^2 + y^2 - 2y + 2z^2 - 5 = 0;
3.) 3x^2 - 12x +y^2 + 3z^2 + 8 = 0;
also when i am using fsolve , it prompts 'fsolve requires optimisation toolbox'
how do i solve that?

Respuestas (1)

Walter Roberson
Walter Roberson el 22 de Abr. de 2020
Editada: Walter Roberson el 22 de Abr. de 2020
The message is correct: fsolve() is part of the Optimization Toolbox.
The closest equivalent that is part of basic MATLAB is fzero(), which can only handle a single equation in a single variable.
If you have the Symbolic Toolbox, you can use that.
Otherwise, I suggest you use the old trick: to find the zeros of multiple equations, you can search for the zeros of a sum of squares of the left hand side of the equations. f1(x)^2 + f2(x)^2 + f3(x)^2 . If each of the individual components of the sum goes to 0 then the sum itself would go to zero, and the individual components would each go to zero if the trial value solves the equation.
To search for zeros of the residue, minimize it: you would be minimizing an unconstrained function in 3 variables, and there are several minimization routines included in basic MATLAB.

Categorías

Más información sobre Solver Outputs and Iterative Display en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by