Skip to content

Commit

Permalink
Fix ds_eigvals order
Browse files Browse the repository at this point in the history
  • Loading branch information
tkf committed Jun 19, 2018
1 parent 986a48a commit 50fff43
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/codim1/analysis.jl
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
function ds_eigvals(::Discrete, J)
ev = eigvals(J)
sort!(ev, by=abs)
sort!(ev, by=abs, rev=true)
return ev
end
# TODO: improve it for StaticArrays

function guess_point_type(::Discrete, cache, eigvals, opts)
old = abs(cache.eigvals[1]) - 1
Expand All @@ -23,7 +24,7 @@ isstable(::Discrete, eigvals) = abs(eigvals[1]) < 1

function ds_eigvals(::Continuous, J)
ev = eigvals(J)
sort!(ev, by=real)
sort!(ev, by=real, rev=true)
return ev
end

Expand Down

0 comments on commit 50fff43

Please sign in to comment.