Implement ode15s function in a discrete model

6 views (last 30 days)
How to implement the ode15s function in a discretized model?
In the continuous model it was quieter, as I found several examples. Now in the discretized model I can not find anything to help me. I emphasize that I am learning to program, so all help and the way that is explained to a lay person will be appreciated.
I can implement and compile by placing the template and specifying the step size. But I would like to apply this numerical solution to the model, just as it was done in the continuum. Any idea how to comoralize this process?
It follows two codes of the discretized model, both get the same results, except that the code_discret_1 is in state space format and the other is in systems format.

Accepted Answer

Walter Roberson
Walter Roberson on 19 Jul 2018
ode15s() and all the other ode* functions that have two numbers after 'ode' (e.g. ode45), are all variable timestep solvers, and all require continuous states. Some of them such as ode45 will, if necessary, go backwards and forwards in time in order to get the required precision.
For discrete states, you need to use a fixed step solver.
MATLAB does not officially provide fixed step solvers for calling from MATLAB, but they have provided a series of them available through https://www.mathworks.com/matlabcentral/answers/98293-is-there-a-fixed-step-ordinary-differential-equation-ode-solver-in-matlab-8-0-r2012b#answer_107643
  5 Comments
Walter Roberson
Walter Roberson on 19 Jul 2018
I have never heard of a Walter system; is that related to http://www.pnas.org/content/pnas/25/9/468.full.pdf ?
Anyhow, I recommend opening a new topic, as I do not have experience with rigid systems.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!