Passing a temporary parameter from time step to time step using ode113?
Mostra commenti meno recenti
Hello,
i'm using ode113 to solve some differential equations wich i stored in a function called RSDGL:
[t,F]=ode113(@RSDGL,[t0 tf],initial_conditions);
However in the function RSDGL i am using fzero to calculate zeros of functions wich appear in the differential equations as those zeros are time dependent. The problem i have is that i want to memorize those zeros temporarly to use them as starting points when i use fzero in the next time step (when ode113 calls RSDGL again). This should increase the performance as those zeros only vary little between each timestep. So i want to programm something like:
zero_new=fzero(function,zero_old);
inside my RSDGL function. I dont really have a clue how to store and overwrite those zeros and how to pass them each time ode113 calls my function RSDGL. I hope you understand my problem, as english is not my first language.
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Programming in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!