Is this way of solving equations correct mathematically?

1 回表示 (過去 30 日間)
Arpita Nehra
Arpita Nehra 2019 年 11 月 10 日
コメント済み: John D'Errico 2019 年 11 月 10 日
We changed the system of equations that we were solving using fsolve to get better results by changing a parametre to a variable and adding an equation for the same. However, I am not confident on the way we are doing it. Hence, I am presenting a short example (since writing the exact equations might be confusing). It would be great to get suggestions if this way writing the equations is correct:
Original system: assume a and b are parameters,
3x-z = a;
2x+5y = b;
y = z;
The change in the system
3x-z = a;
2x+5y = b;
y = z;
2x+5z = b
  1 件のコメント
John D'Errico
John D'Errico 2019 年 11 月 10 日
So what are the equations you are using in the second case? What you have written is identical to the first, having replaced z with y in one equation.
Are you thinking that since you have reduced the problem to one of 2 equations in 2 unknowns it is better? (Yes, by reducing the search space, of course this must be an improvement.)
But if you have 4 equations in the second case, that is a bad idea.
Regardless, the system you have posed is trivial, and should never be solved using fsolve anyway, since it is LINEAR! As well, fsolve cannot have unknown parameters. So a and b must be KNOWN parameters.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeMathematics についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by