MATLAB: How to solve this issue

MATLABode45

Hello there,
I got this error when i use ODE15s solver :
Error using odearguments (line 113)
Inputs must be floats, namely single or double.
Error in ode15s (line 150)
odearguments(FcnHandlesUsed, solver_name, ode, tspan, y0, options, varargin);
Error in simple (line 44)
[T1,cox]=ode15s(@(t,y1) Costatesimple(t,y1,u,x1,x2,yd,x1t,e1,w1,w2,w3,w4,v1,v2),tspan2,[0 0 0 0 0 0 0],options);
any help please?
Note: i used syms in diffrent file to get some parameters and save it as a datafile then load it in Costatesimple file…
thank you so much indeed

Best Answer

If the extra parameters (or any other values) you are passing to ‘Costatesimple’ are symbolic, (and do not contain any symbolic variables), it will be necessary to use the double function to convert them to double-precision values that ode15s can use.