an example of using ode15i
Afficher commentaires plus anciens
I'm trying to use ODE15i to solve a very easy problem (y'=y with y(0)=1). since I will have more complicated relationships to deal with later. I'm not familiar with this coding language so my example can not run. I ran and there is an error saying no enough parameters is provided. How should I make it right?
That's my main code:
clearvars;
tspan=[0 1];
y0=1;
yp0=1;
options=odeset('AbsTol',1e-10);
[t,y] = ode15i(odefun_try,tspan,y0,yp0);
plot(t,y,'--blue'); title('real');
and function defined in another .m file named odefun_try.m:
function f = odefun_try(t,y,yp)
f = yp - y;
end
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur App Building dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!