Skip to content

Commit

Permalink
Upgraded code to handle 1 dimensional cases
Browse files Browse the repository at this point in the history
  • Loading branch information
albep committed Jul 18, 2016
1 parent 9e42801 commit e093754
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/matrix_eqn.jl
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ function solve_discrete_riccati(A::ScalarOrArray, B::ScalarOrArray,
BTA = B' * A

for gamma in candidates
Z = R + gamma .* BB
Z = reshape(R + gamma .* BB, n, n)
cn = cond(Z)
if isfinite(cn)
Q_tilde = -Q + N' * (Z \ (N + gamma .* BTA)) + gamma .* I
Expand Down

0 comments on commit e093754

Please sign in to comment.