Different answers each run halving step size, debugging code correctly

조회 수: 6 (최근 30일)
al
al 2025년 1월 21일
댓글: Walter Roberson 2025년 1월 21일
Hello,
I have a code computing a rockets trajectory using Rungekutta. The issue is computing error, I am trying to compute and estimated global error, by comparing two results with different step size. There is a while loop in the code, which halves the step size to compute local truncation error and minimize this. However, I descided to deactivate this, so the issue is not here. I have tried to search trough the code various times, but I can not seem to find an issue anywhere.
Any help is greatly appriciated
  댓글 수: 1
Walter Roberson
Walter Roberson 2025년 1월 21일
A common error in RK type of calculations is failing to multiply by the step size in all of the appropriate places.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Programming에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by