MATLAB: Error using odearguments??

MATLABode45odearguments

What does this error message mean?
??? Error using ==> odearguments at 120
Inputs must be floats, namely single or double.
Error in ==> ode45 at 172
[neq, tspan, ntspan, next, t0, tfinal, tdir, y0, f0, odeArgs, odeFcn, ...
Error in ==> Testfunction at 32
[t,x] = ode45(@somefn, tspan, x0);
Thanks in advance for any help!

Best Answer

The message means, that the subfunction odearguments recieves non-float values, although it needs this type. The message is actually clear in this point.
Are tspan or x0 both floating point types? You can check this by:
class(tspan)
class(x0)
Related Question