solving Z + 2 simultaneous nonlinear equations numerically (Newton) with sum
1 回表示 (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (1 件)
Amanpreetsingh Arora
2020 年 11 月 10 日
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 件のコメント
Amanpreetsingh Arora
2020 年 11 月 11 日
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.
参考
カテゴリ
Help Center および File Exchange で Systems of Nonlinear Equations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!