How to find the value of a variable in MATLAB that exists on both sides of th eequal sign?
이전 댓글 표시
Does anybody know how we can find the value of a variable in MATLAB that exists on both sides of equal sign, e.g. n in 2n+q=n+r (n is the only variable)?
In this case it is so simple; n=r-q. But what if the equation is very complex and we are not able to transfer the variable to one side?
채택된 답변
추가 답변 (1개)
Brian B
2014년 5월 16일
If you have the Symbolic Toolbox, you can use:
>> syms n q r
>> solve('2*n+q=n+r','n')
ans =
r - q
카테고리
도움말 센터 및 File Exchange에서 Numeric Solvers에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!