필터 지우기
필터 지우기

Why is MATLAB "solve" not finding a solution?

조회 수: 3 (최근 30일)
Kevin Bachovchin
Kevin Bachovchin 2013년 12월 9일
댓글: Walter Roberson 2013년 12월 9일
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
Kevin Bachovchin
Kevin Bachovchin 2013년 12월 9일
Also I'm not looking for a numerical solution, I'm looking for a symbolic solution. I've used the "solve" command successfully before. I'm not sure why it is failing on this system.
Kevin Bachovchin
Kevin Bachovchin 2013년 12월 9일
I've been trying to debug this problem and I found that
solve(-xd == 0, xd) yields xd = 0 like it is supposed to
while solve(-id == 0, id) yields no solution can be found. I don't understand what is causing the difference. Can someone please help me?

댓글을 달려면 로그인하십시오.

채택된 답변

Walter Roberson
Walter Roberson 2013년 12월 9일
Potentially it is a clash with a MuPAD name. See http://www.mathworks.com/help/symbolic/mupad_ref/id.html
  댓글 수: 2
Kevin Bachovchin
Kevin Bachovchin 2013년 12월 9일
Ok, thanks. Any idea how to get around this issue (other than using a new variable name)?
Walter Roberson
Walter Roberson 2013년 12월 9일
Sorry, I do not have that toolbox to test with.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by