I am trying to solve for a and e in terms of rpark, but MATLAB is giving me an answer for rpark and e in terms of a.
rpark = 1750.5:.01:10000;
syms a e rpark
S = solve(a == (rmoon*(1+e*cos(-20)))/(1-e^2), a == (rpark*(1-e))/(1-e^2));
S.a
S.e
If anyone knows how to correct this it would be greatly appreciated.

 Réponse acceptée

Star Strider
Star Strider le 5 Nov 2018
Try this:
syms a e rpark rmoon
[Sa,Se] = solve(a == (rmoon*(1+e*cos(-20)))/(1-e^2), a == (rpark*(1-e))/(1-e^2), [a,e])
returning:
Sa =
-(rpark*(7351352886077503*rmoon + 18014398509481984*rpark))/(10663045623404481*rmoon - 36028797018963968*rpark)
Se =
-(18014398509481984*(rmoon - rpark))/(7351352886077503*rmoon + 18014398509481984*rpark)

Plus de réponses (0)

Catégories

En savoir plus sur Programming dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by