Problem about the ode45 time steps?

2 views (last 30 days)
I was confused about the ode45 time steps, and l saw the Runge-Kutta in wikipedia
I saw many community from the MathWorks, and I know that ode45 will control the time step adaptively.
I also learned it from my professor, but I has a problem.
What is constant time steps? Is this the same as output time?
From my view, the output time matrix is the same as the input times step, and it's the same time step.
Is the above discussion right or not?
Which condition will cause the different output time step happen? (If my comprehension is right.)

Accepted Answer

Torsten
Torsten on 26 Jun 2023
You specify the times when you want ODE45 to output the solution in the array "tspan".
This array is not used by ODE45 to deduce the time steps to be made to get the solution of the problem. The "internal" time stepping is done with respect to the relative and absolute error tolerances (RelTol and AbsTol) you prescribe in the options setting. The solution at the specified times from "tspan" is then deduced from the solution at the "internal" times via interpolation.

More Answers (0)

Tags

Products


Release

R2022b

Community Treasure Hunt

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

Start Hunting!