Skip to content

Commit 3642512

Browse files
committed
Change saveat handling similar to DiffEq
1 parent f54deb2 commit 3642512

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/MATLABDiffEq.jl

+6-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,12 @@ function DiffEqBase.__solve(
2929
f = prob.f
3030
u0 = prob.u0
3131

32-
tspan = sort(unique([prob.tspan[1];saveat;prob.tspan[2]]))
32+
if typeof(saveat) <: Number
33+
tspan = [prob.tspan[1]:saveat:prob.tspan[2];]
34+
tspan = sort(unique([prob.tspan[1];tspan;prob.tspan[2]]))
35+
else
36+
tspan = sort(unique([prob.tspan[1];saveat;prob.tspan[2]]))
37+
end
3338

3439
sizeu = size(prob.u0)
3540

0 commit comments

Comments
 (0)