Im using a code to calculate when a satellite re-enters the atmosphere. I need the code to stop running after the satellites altitude goes below 100km. Is there a function i can use to do this?
Afficher commentaires plus anciens
Im using a code to calculate when a satellite re-enters the atmosphere. I need the code to stop running after the satellites altitude goes below 100km. Is there a function i can use to do this?
Réponses (2)
Nut
le 21 Mar 2017
Maybe the return function:
https://it.mathworks.com/help/matlab/ref/return.html
if altitude < 100
return
end
Star Strider
le 21 Mar 2017
0 votes
It depends on how you’re writing your code. If you’re using a differential equation solver, consider using the ‘event’ option. Otherwise, consider a while loop.
Catégories
En savoir plus sur Reference Applications 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!