フィルターのクリア

"Animated" graph during cycle

1 回表示 (過去 30 日間)
Ludovico Soldati
Ludovico Soldati 2015 年 6 月 1 日
回答済み: Walter Roberson 2015 年 6 月 1 日
Hi everybody, I've got a problem I'm trying to plot a particular orbit of a satellite during a while cycle, but Matlab collects all the data and plot them at the end of the cycle. I don't know if the mistake I made is in the structure of the cycle or in the formulas, but it takes an infinity of time and at the end it shows, in the graph, an infinity of wrong lines :P
The code I'm using is this one, there is already the graph of the Earth existing
while Rmbt ~= Rmtar
Rtar = [Rmtar * cos(theta2) Rmtar * sin(theta2)];
Rmbt = at * (1 - ebt^2) / (1 + ebt * cos(theta1));
Rbt = [Rmbt * cos(theta1) Rmbt * sin(theta1)];
theta1 = theta1 + 1;
theta2 = theta2 + 1;
plot (Rtar(1), Rtar(2), 'r')
hold
plot (Rbt(1), Rbt(2), 'b')
hold all
end
where Rmbt is the "moving" trajectory and Rmtar is the target trajectory, they are the radius bi-dimensional vectors of the satellites, while "theta1/2" are the angles
-----------
I'd like to see the orbit that evolves in time reaching the second one.
Thank you all

回答 (1 件)

Walter Roberson
Walter Roberson 2015 年 6 月 1 日

カテゴリ

Help Center および File ExchangeEarth and Planetary Science についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by