Filter löschen
Filter löschen

"Animated" graph during cycle

1 Ansicht (letzte 30 Tage)
Ludovico Soldati
Ludovico Soldati am 1 Jun. 2015
Beantwortet: Walter Roberson am 1 Jun. 2015
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

Antworten (1)

Walter Roberson
Walter Roberson am 1 Jun. 2015

Kategorien

Mehr zu Earth and Planetary Science finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by