solve function errors/ faults
显示 更早的评论
I am trying to solve a a 4-variable system of equations, however, I am getting the response:
Empty sym: 0-by-1
syms i1 i2 v1 v2
eqns = [-160 +10*i1+v1==0, 96==v2-12*i2,v2/v1==4, i1/i2 == 4 ];
s = solve(eqns,v1);
Any help would be much obliged.
采纳的回答
更多回答(1 个)
Walter Roberson
2020-5-5
0 个投票
do not solve() a system of equations with multiple equations for a single variable. solve for as many variables as there are equations and select the appropriate output.
It does sometimes work to solve a system that includes inequalities if the number of equalities is the same as the number of variables being solved for.
6 个评论
Preston Glenn
2020-5-5
darova
2020-5-5
I did all the work myself. Why this question is accepted not mine?
Walter Roberson
2020-5-5
darova, I provided a key solution and explanation before you provided the solution without explanation.
darova
2020-5-5
Your solution is incomplete
Preston Glenn
2020-5-5
darova
2020-5-5
Thank you
类别
在 帮助中心 和 File Exchange 中查找有关 Equation Solving 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

