Hi,

I am making simple examples of the ODE package in Julia, but I cannot make 
a code without error for 1st order ODE.

Here is my code:

using ODE;
>
> function f(t, y)
>     x = y
> ​
>     dx_dt = (2-x)/5
>     
>     dx_dt
> end
>
> const start = 3;
> time = 0:0.1:30;
>
> t, y = ode23(f, start, time);
>

It finally gives:
LoadError: InexactError()
while loading In[14], in expression starting on line 1

in copy! at abstractarray.jl:310
in setindex! at array.jl:313
in oderk_adapt at C:\Users\user\.julia\v0.4\ODE\src\runge_kutta.jl:279
in oderk_adapt at C:\Users\user\.julia\v0.4\ODE\src\runge_kutta.jl:220
in ode23 at C:\Users\user\.julia\v0.4\ODE\src\runge_kutta.jl:210 

The example of 2nd order ODE at the GitHub works fine.

How should I edit the code?

Reply via email to