Multiple Equations Solver Problem

All variables are known except c, Prise, Treflection and Pabs
syms c
Treflection = 2*L_drivepipe/c;
Prise = c*rho*V_crit*Treflection/Taction;
Pabs = Pstat_closing + Prise;
if (Air_in_Account == false)
eq1 = c == sqrt(1/(rho*(1/Ev_water+(s)*D_drivepipe/EYoung/Thick_drivepipe)));
else
eq1 = c == sqrt(1/(rho*(cv1/Ev_water+cv2/gamma/Pabs+ (s)*D_drivepipe/EYoung/Thick_drivepipe)));
end
[c] = solve(eq1,c);
c = eval(c);
Prise = eval(Prise);
Pabs = eval(Pabs);
Treflection = eval(Treflection);
Matlab calculates values for Pabs and Prise. But does not give a value for c while actually Pabs and Prise are functions of c. I know that we can solve back to know the value of c out of the result of Pabs or Prise but that doesn't seem good programming to me. Making a set of equations was also an option but my matlab only returned a matrix with the variables in it without values. Can someone help?
This is an easy solve situation and I can't understand that since a week my matlab is unable to give good outputs.
Thanks in advance, A

 採用された回答

Alexander
Alexander 2014 年 11 月 24 日

0 投票

I installed matlab again and now it works fine.

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeIntroduction to Installation and Licensing についてさらに検索

タグ

質問済み:

2014 年 11 月 24 日

回答済み:

2014 年 11 月 24 日

Community Treasure Hunt

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

Start Hunting!

Translated by