Need some help, Four coupled ODEs with ode45
Mostrar comentarios más antiguos
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 comentarios
Andrew Reibold
el 19 de Nov. de 2014
Saying you have consulted every manual and example online is quite a bold statement, lol.
Robert
el 20 de Nov. de 2014
Respuesta aceptada
Más respuestas (1)
Torsten
el 20 de Nov. de 2014
0 votos
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.
Categorías
Más información sobre Ordinary Differential Equations en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!