I spoke too soon. It works for the 2D case, but for a system of 3 ODE it fails. Namely the code:

```
using PyPlot;
include("RKF45.jl");
function f(params, t, vars)
sigma = params.sigma;
beta = params.beta;
rho = params.rho;
x = vars[1];
y = vars[2];
z = vars[3];
dx = sigma*(y-x);
dy = x*(rho-z) - y;
dz = x*y - beta*z;
return [dx, dy, dz];
end
struct paramObj
sigma
beta
rho
end
# Problem parameters
sigma = 10;
beta = 8/3;
rho = 28;
params = paramObj(sigma, beta, rho);
t0 = 0.0;
tf = 60.0;
x0 = 1.0;
y0 = 1.0;
z0 = 1.0;
conds = [x0 y0 z0];
epsilon = 1e-9;
dtInitial = 0.1;
solution = RKF45(f, params, t0, tf, conds, epsilon, dtInitial);
x = solution.vars[:,1];
y = solution.vars[:,2];
z = solution.vars[:,3];
PyPlot.figure(1)
PyPlot.clf();
PyPlot.plot3D(x, y, z);
```

(where RKF45.jl is where I stored rkf45, just renamed to RKF45) gives the error:

```
ERROR: LoadError: MethodError: no method matching RKF45(::typeof(f), ::paramObj, ::Float64, ::Float64, ::Array{Float64,2}, ::Float64, ::Float64)
You might have used a 2d row vector where a 1d column vector was required.
Note the difference between 1d column vector [1,2,3] and 2d row vector [1 2 3].
You can convert to a column vector with the vec() function.
Closest candidates are:
RKF45(::Function, ::Any, ::Number, ::Number, ::Array{T,1} where T, ::Float64, ::Float64) at /data/fusion809/GitHub/mine/scripts/julia-scripts/ODEs/RKF45.jl:34
Stacktrace:
[1] top-level scope at /data/fusion809/GitHub/mine/scripts/julia-scripts/ODEs/Lorenz.jl:38
[2] include(::String) at ./client.jl:457
[3] top-level scope at REPL[1]:1
[4] run_repl(::REPL.AbstractREPL, ::Any) at /build/julia/src/julia-1.5.2/usr/share/julia/stdlib/v1.5/REPL/src/REPL.jl:288
in expression starting at /data/fusion809/GitHub/mine/scripts/julia-scripts/ODEs/Lorenz.jl:38
```

Line 34 of RKF45.jl is:

```
function RKF45(f::Function, params, t0::Number, tf::Number, conds::Vector, epsilon::Float64, dtInitial::Float64)
```

EDIT: Oops, sorry! I just discovered my error. I added `::Vector`

after conds in the function definition and that caused the error.