How can I extract extra variable from ode solver ?
2 views (last 30 days)
Show older comments
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
0 Comments
Answers (0)
See Also
Categories
Find more on Ordinary Differential Equations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!