How can I run two functions simultaneoulsy in an app?

3 vues (au cours des 30 derniers jours)
Riccardo Basile
Riccardo Basile le 21 Déc 2018
I made an app about satellite orbits around the Earth. If the user checks a checkbox, a function which displays a figure with animated graphics is run. If the user checks another checkbox then another similar function is run (it displays another figure with another kind of plot drawn in real time using drawnow, like the former). Basically my functions are like these:
function EVALUATEButtonPushed(app, event)
if (CheckBox.Value == 1)
[~, ~, ~, ~, gpt] = GroundTrack(VettXs, VettYs, VettZs, omegarot, dt, Nt, RT);
OrbitGFX(gpt); % No need to call the TjctANDGfx_INI again,
% it has already been called
end
if (app.GroundtrackwithplotCheckBox.Value == 1)
[glongitude, date, longitude, latitude, gpt] = GroundTrack(VettXs, VettYs, VettZs, omegarot, dt, Nt, RT);
GroundTrackGFX(latitude, glongitude, date, Nt, i*180/pi, omegarot, dt);
end
end
OrbitGFX displays 3D graphics of the satellite around the planet, while GroundTrackGFX displays the satellite ground track. As it is now OrbitGFX finishes to run and then GroundTrackGFX runs. Basically I'd like these two functions to run simultaneously in order to be able to see them at the same time.

Réponse acceptée

Cris LaPierre
Cris LaPierre le 21 Déc 2018
This answer looks like it might provide the information you are looking for.

Plus de réponses (0)

Catégories

En savoir plus sur CubeSat and Satellites dans Help Center et File Exchange

Produits


Version

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by