solving Z + 2 simultaneous nonlinear equations numerically (Newton) with sum
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Hello ,
I am trying to solve Z + 2 simultaneous nonlinear System but i have problems with that because of the sum . I do not know how to deal with that in Matlab
I have 3 Equations with 3 Unknowns the equations as follows
The Unknowns are
, and
Thank you very much for any Help
0 comentarios
Respuestas (1)
Amanpreetsingh Arora
el 10 de Nov. de 2020
You can solve the system of equations using "fsolve". Implement a function that takes the Z+2 dimensional unknowns as input and returns Z+2 dimensional vector with the values of LHS of the Z+2 equations. Then pass this function with an initial guess to "fsolve". The documentation for "fsolve" is as follows.
3 comentarios
Amanpreetsingh Arora
el 11 de Nov. de 2020
How many equations and variables do you have? Your original post mentions Z+2 but the function only has 3 equations and 3 unknowns.
As per your original post, your function input "x" needs to be Z+2 dimensional. For example, you can represent your unknowns as follows.
x(1) =
x(2) =
x(3:end) = vector
which can be mapped to
F(1:Z) = The first equation (which is collection of Z equations)
F(Z+1) = 2nd eqn, F(Z+2) = 3rd eqn.
For summation, just keep adding values to F(Z+1) and F(Z+2) in the loop, as follows.
% Inside the loop
F(Z+1)=F(Z+1) + <summation term>;
F(Z+2)=F(Z+2) + <summation term>;
You don't need symsum for this.
khaled elbatawy
el 6 de Dic. de 2020
Editada: khaled elbatawy
el 6 de Dic. de 2020
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!