Need some help, Four coupled ODEs with ode45
Afficher commentaires plus anciens
Hi there, I'm fairly new to MATLAB, and I have never used the ODE integrators before. I'm trying to plot the solution to a two-cell coupled Fitzhugh-Nagumo model.
The equations must be coupled through the y variable, as I have written in lines 7 and 10. I have tried several different methods of writing the functions, but every time I end up with the "not enough input arguments" error.
Please help, I've consulted every manual and example online but cannot seem to figure out what I'm doing wrong. The file is attached.
Thank you in advance!
2 commentaires
Andrew Reibold
le 19 Nov 2014
Saying you have consulted every manual and example online is quite a bold statement, lol.
Robert
le 20 Nov 2014
Réponse acceptée
Plus de réponses (1)
Torsten
le 20 Nov 2014
0 votes
Use the for-Loop in the call to ode45, not in fntest:
For k=1:5
II=0.05*k;
[t,xy] = ode45(@(t,y)fntest(t,y,II),[0 4],[0 0 0 0]);
plot(t,xy);
end
Best wishes
Torsten.
Catégories
En savoir plus sur Ordinary Differential Equations 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!