How to solve this odearguments error when trying to use 'ODE45' command?
Afficher commentaires plus anciens
I got an error:
Error in ode45 (line 115)
odearguments(FcnHandlesUsed, solver_name, ode, tspan, y0, options, varargin);
Error in solution (line 9)
[t,x] = ode45('func',[0 5],[0 0]);
My code is:

Réponses (1)
Cris LaPierre
le 21 Mar 2021
0 votes
Your syntax is wrong. You are passing in a character array to ode45, not a function.
Use @func instead of 'func'.
1 commentaire
Wei Zhang
le 21 Mar 2021
Catégories
En savoir plus sur Ordinary Differential Equations dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!