solving ode with variable, discrete coefficients
Mostra commenti meno recenti
Hi there, I am working on solving a system of ODEs where there are variable, discrete coefficients. However, I don't know how to handle ode45 function and my equation function. If someone could help me, it would be really appreciated.
My problem is * u'(s) = v(s) * v'(s) = A(s)*cos(u(s)) * u(0) = 0, v(0) = 1,
where A(s) is not a closed form of function, but vector of values at each point s, which is obtained from solving preliminary ODEs. What I am thinking is to call another function which returns the value of A at each point s inside my ode function. But, I am not sure how to handle the independent variable s in ode45 so that 's' in ode45 is matched with the 's' which is already defined in A(s).
Thanks
Risposte (1)
Torsten
il 8 Lug 2016
0 voti
Take a look at the example "ODE with Time-Dependent Terms" under
to see how you should proceed.
Best wishes
Torsten.
Categorie
Scopri di più su Ordinary Differential Equations in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!