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?
조회 수: 5 (최근 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!