@@ -6,22 +6,22 @@ using Reexport
66@reexport using DiffEqBase
77using MATLAB
88
9- abstract MATLABAlgorithm <: DiffEqBase.AbstractODEAlgorithm
10- immutable ode23 <: MATLABAlgorithm end
11- immutable ode45 <: MATLABAlgorithm end
12- immutable ode113 <: MATLABAlgorithm end
13- immutable ode23s <: MATLABAlgorithm end
14- immutable ode23t <: MATLABAlgorithm end
15- immutable ode23tb <: MATLABAlgorithm end
16- immutable ode15s <: MATLABAlgorithm end
17- immutable ode15i <: MATLABAlgorithm end
9+ abstract type MATLABAlgorithm <: DiffEqBase.AbstractODEAlgorithm end
10+ struct ode23 <: MATLABAlgorithm end
11+ struct ode45 <: MATLABAlgorithm end
12+ struct ode113 <: MATLABAlgorithm end
13+ struct ode23s <: MATLABAlgorithm end
14+ struct ode23t <: MATLABAlgorithm end
15+ struct ode23tb <: MATLABAlgorithm end
16+ struct ode15s <: MATLABAlgorithm end
17+ struct ode15i <: MATLABAlgorithm end
1818
1919function DiffEqBase. __solve {uType,tupType,isinplace,AlgType<:MATLABAlgorithm} (
2020 prob:: DiffEqBase.AbstractODEProblem{uType,tupType,isinplace} ,
2121 alg:: AlgType ,timeseries= [],ts= [],ks= [];
22- saveat= eltype (tType )[],timeseries_errors= true ,reltol = 1e-3 , abstol = 1e-6 ,
22+ saveat= eltype (tupType )[],timeseries_errors= true ,reltol = 1e-3 , abstol = 1e-6 ,
2323 kwargs... )
24-
24+
2525 tType = eltype (tupType)
2626
2727 if ! (typeof (prob. f) <: DiffEqBase.AbstractParameterizedFunction )
@@ -72,9 +72,9 @@ function DiffEqBase.__solve{uType,tupType,isinplace,AlgType<:MATLABAlgorithm}(
7272
7373 # Reshape the result if needed
7474 if uType <: AbstractArray
75- timeseries = Vector {uType} (0 )
75+ timeseries = Vector {uType} (undef, length (ts) )
7676 for i= 1 : length (ts)
77- push! ( timeseries, timeseries_tmp[i,:])
77+ timeseries[i] = timeseries_tmp[i,:]
7878 end
7979 else
8080 timeseries = timeseries_tmp
0 commit comments