Symbolic calculation question.

Hi,
i was been working in the longitudinal aircraft stability with these equations
i have 2 equations (DCmcgDAlfa and Cmcg) and 2 unknowns (Clt and Xcg) and i use this comand to solve the problem:
syms Clw Xcg
DCmcgDClw=((Xcg-Xca)/Cw)+((Clw*Za)/Cw)*((2/(pi*At*e))-(1/aw))+DCmfnClw+((2*Clt*at*Ht*St)/(pi*At*e*aw*Cw*Sw*Nt))*(1-DEpsilonDAlfa)-((at*St*Nt*(Lt-(Xcg-Xca)))/(aw*Sw*Cw))*(1-DEpsilonDAlfa);
Cmcg=((Xcg-Xca)/Cw)*Clw+(Clw^2)*((1/(pi*Aw*e))-(1/(2*aw)))*(Za/Cw)+Cmcaw+Cmfn+Cmcat*((St*Ct*Nt)/(Sw*Cw))+((St*Ht*Nt)/(Sw*Cw))*(Cdt+((Clt^2)/(pi*At*e)))-((Clt*Nt*(Lt-(Xcg-Xca)))/(Cw*Sw))
vars=[Xcg,Clt];
Eqn=[DCmcgDClw==0,Cmcg==0];
res=solve(Eqn,vars);
eval(res.Xcg);
it's OK the method i use? because the results are really bad!
thank you!
Nicolas

4 件のコメント

madhan ravi
madhan ravi 2019 年 5 月 30 日
because the results are really bad!
Meaning ? , note usage of eval() is superfluous
Nicolas Sposato
Nicolas Sposato 2019 年 5 月 30 日
hi ravi,
the results not reponse at the nature of the problem.
but my question its about the method of resolution the 2 equations with 2 unknowns, its ok?
thank you!
darova
darova 2019 年 5 月 30 日
why didn't you declare Clt as syms variable before equations?
syms Clt Clw Xcg
Nicolas Sposato
Nicolas Sposato 2019 年 5 月 30 日
Hi, darova
yes! i forget it!, the solver works very well now!
thank you!
Nicolas.

サインインしてコメントする。

回答 (0 件)

タグ

質問済み:

2019 年 5 月 30 日

コメント済み:

2019 年 5 月 30 日

Community Treasure Hunt

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

Start Hunting!

Translated by