필터 지우기
필터 지우기

Is time linear inside an ode45 function?

조회 수: 1 (최근 30일)
J Krause
J Krause 2018년 7월 29일
편집: Stephen23 2018년 7월 29일
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.

채택된 답변

Stephen23
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개)

카테고리

Help CenterFile Exchange에서 Ordinary Differential Equations에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by