Is this way of solving equations correct mathematically?

1 次查看(过去 30 天)
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 CenterFile Exchange 中查找有关 Mathematics 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by