[eqns,vars] = getEqns(varargin{:}); problem with solve function

4 views (last 30 days)
syms id iq f ecd ecq v0 s xd xl xad xq xf rf ra r idd iqd fd wb w
solve('-(xd+xl)*idd+xad*fd=wb*((ra+r)*id-xl*iq-w*xq*iq+ecd+v0*sin(s)','xad*idd+xf*fd=wb*(rf*efd/xad-rf*f)',idd,fd)
I am new to MATLAB.
i want the solution for idd and fd in terms of other variables, what is wrong in the above code?
Also, can solve be used for non linear equations??

Answers (1)

Walter Roberson
Walter Roberson on 26 Mar 2014
The part that starts
((ra+r)
the first of those two ( has no matching )
Solve can be used for non-linear equations, but frequently the answer is written in terms of RootOf() something with the something not having a closed-form solution known to MuPAD. In the case of your equations, above, the expressions are linear in those variables so there is no problem.

Community Treasure Hunt

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

Start Hunting!