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?
1 次查看(过去 30 天)
显示 更早的评论
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?
0 个评论
回答(2 个)
Nut
2017-3-21
Maybe the return function:
https://it.mathworks.com/help/matlab/ref/return.html
if altitude < 100
return
end
0 个评论
Star Strider
2017-3-21
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.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Reference Applications 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!