Skip to content

Commit 43579fd

Browse files
Merge pull request #18 from utkarsh530/saveathandling
Change saveat handling similar to DiffEq
2 parents f54deb2 + 59d5fe8 commit 43579fd

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Diff for: 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 = Array(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)