How can I extract extra variable from ode solver ?

조회 수: 2 (최근 30일)
Vincent DUFOUR
Vincent DUFOUR 2017년 3월 14일
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개)

카테고리

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