"Animated" graph during cycle
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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
0 commentaires
Réponses (1)
Voir également
Catégories
En savoir plus sur Reference Applications dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!