How to solve 5 equations with 5 unknowns

14 次查看(过去 30 天)
Hi, I don't have any idea how to solve this system. I'm beginner so i don't knew how to write corect code. Pls help me. Equations:
(A-B-C)*5=C*6 ////
(A-B-C)*2+B*3=(A-B)*D ////
(A-B)*(2-D)=B*3 ////
(A-B)*2+B*4=B*E ////
A*2+(A-B)*3+(A-B-C)*2=50
  7 个评论
Hinko Fic
Hinko Fic 2015-5-30
编辑:Hinko Fic 2015-5-30
Yeah, i knew how to solve linear, but this isn't. That's reason why i need help. I need to solve these equations with different numbers (more complicated) for my project in school
Roger Stafford
Roger Stafford 2018-3-11
I don't remember this problem from almost two years ago, but apparently all of us (except perhaps Muhammad Saleem) overlooked the fact that it is actually a system of five linear equations in the five unknown quantities, A, B, C, d=(A-B)*D, and e=B*E, so it can be solved for these latter five variables using matrix division. From those solutions, it is easy to then find D and E: D = d/(A-B) and E = e/B.

请先登录,再进行评论。

采纳的回答

Roger Stafford
Roger Stafford 2015-5-29
编辑:Roger Stafford 2015-5-29
You can use 'solve' in the Symbolic Toolbox to solve them.
My alternate method was in error. Just use 'solve'. It does very well.
  5 个评论
Walter Roberson
Walter Roberson 2015-5-30
structfun(@double, sol, 'Uniform', 0)
will return back a structure whose fields are a, b, c, d, e. For any particular one of them you can use (e.g.) double(sol.b)
Hinko Fic
Hinko Fic 2015-5-30
That works, ty a lot, you saved me a lot of time

请先登录,再进行评论。

更多回答(1 个)

Alex Sha
Alex Sha 2019-10-12
Numercial solution:
a: 9.00473933649289
b: 1.18483412322275
c: 3.55450236966825
d: 1.54545454545455
e: 17.2

类别

Help CenterFile Exchange 中查找有关 Number Theory 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by