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!