why my adaptive RK4 code cannot be as efficient as ode45?

2 ビュー (過去 30 日間)
Zixuan Li
Zixuan Li 2019 年 3 月 27 日
編集済み: Stephan 2019 年 3 月 28 日
I wrote a code of adaptive RK4 method, the tolerance can be changed, and the idea is based on wikipedia (compare the difference of RK2 and RK4 and modify the next step size)
However I can never get same quantity of data as ode45 with the computational time the same as ode45.
Why is my code much less efficient?

回答 (1 件)

Stephan
Stephan 2019 年 3 月 28 日
編集済み: Stephan 2019 年 3 月 28 日
Hi,
have a look at this and the related sites:
Since you gave us a very unspecific question without your code, all we can do is give a general answer.
Best regards
Stephan

カテゴリ

Help Center および File ExchangeOrdinary Differential Equations についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by