How can I extract extra variable from ode solver ?

2 visualizaciones (últimos 30 días)
Vincent DUFOUR
Vincent DUFOUR el 14 de Mzo. de 2017
Hi everyone, I am trying to extract some extra variable from ode-solver (ode15s here) by using the 'OutputFcn' option with odeset.
Unfortunately I can't make it work and I don't know why, I think it's because the variable I want to extract are computed through time-dependent terms and I am not sure if the function for the 'OutputFcn' option accept this kind of terms...
I tried other technics like using 'save' but it saves vector with bigger size than the tspan vector, and with strange value (I saved dX via the solver and via the 'save' function and I find different values..)
I leave you my Output function, knowing that normally the terms s,c,sp are computed in the main file for the ode15 and interpolated with the t term to solve the ODE system (for the OutputFcn I tried to compute these terms inside, outside etc..)
PS: you can directly run the mainODE file
Thanks a lot for your help

Respuestas (0)

Categorías

Más información sobre Ordinary Differential Equations en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by