Why is MATLAB "solve" not finding a solution?
显示 更早的评论
Hello,
I have a system of equations:
-id = 0
qd/(C*L) - (Vs - R*id)/L = 0
I'm trying to solve this system of equations for id and Vs using the MATLAB solve function. After defining all variables as syms, I'm using the below code
Equations = [-id ; qd/(C*L) - (Vs - R*id)/L]
Solution = solve(Equations==0,id,Vs)
However, this is producing a warning, "Explicit solution could not be found." Why isn't MATLAB able to find a solution here?
There is a solution (id = 0, Vs = qd/C) which can be easily solved by hand.
Thank you,
Kevin
4 个评论
Jie
2013-12-9
Not all equations have explicit solutions. Try numerical solution by fsolve or fzero. To be honest, I don't understand the way you write your equation much. I wish I could help..
Kevin Bachovchin
2013-12-9
Kevin Bachovchin
2013-12-9
Kevin Bachovchin
2013-12-9
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Common Operations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!