Use the time step within ode15s

I am using ode15s to solve a set of differential equation on the form M(t,y)dy/dt = f(t,y). Due to the way I have formulated my ode's now, I need to use the time step from ode15s inside the function f(t,y). As far as I can see, I only have access to the present time 't' when ode15s is working, but is there any way to work around this so I can use the time step dt?

1 件のコメント

darova
darova 2019 年 11 月 27 日
How is it going?

サインインしてコメントする。

 採用された回答

Jan
Jan 2019 年 11 月 28 日

0 投票

If the function to be integrated requires the time steps of the solver, something went wrong. I'm convinced that this is a logical error in the implementation. Please explain, why you think you need this.

2 件のコメント

Carina Bringedal
Carina Bringedal 2019 年 12 月 1 日
The question is 6 years old. I do not remember how I solved it, but I think I did. I at least do not need an answer to the question anymore.
darova
darova 2019 年 12 月 1 日
THe answer looks correct

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

質問済み:

2013 年 12 月 10 日

コメント済み:

2019 年 12 月 1 日

Community Treasure Hunt

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

Start Hunting!

Translated by