Is time linear inside an ode45 function?
1 回表示 (過去 30 日間)
古いコメントを表示
Is time within a function being solved using ode45 linear, or are time steps able to be repeated?
I am trying to control a stepper motor, but am noticing that one or two time steps will repeat every so often, causing my program to go crazy. For example, time will be linear (1,2,3,4), then it will go back a time step and repeat so that there are then 2 values for 3 and 4.
0 件のコメント
採用された回答
Stephen23
2018 年 7 月 29 日
編集済み: Stephen23
2018 年 7 月 29 日
"Is time within a function being solved using ode45 linear"
Time is linear in the sense that the difference between 1 and 2 is the same as the difference between 2 and 3. But I suspect you are actually asking if the times where the ODE function is evaluated are linearly spaced, in which case the answer is "no": the time step size used for calculating the function changes with the behavior of the function (stiffness, etc) and the user/default options. These sample steps are definitely not linearly spaced!
"or are time steps able to be repeated?"
I don't see anything in the documentation that excludes that possibility.
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Ordinary Differential Equations についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!