Skip to content

Commit 160423e

Browse files
committed
add missing call to c2d in example
1 parent 6f53726 commit 160423e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/ControlSystemsBase/src/discrete.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ cc = sol.u[end][end] # Continuous-time cost
209209
# Discrete-time version
210210
Ts = 0.01
211211
sysd = c2d(sysc, Ts)
212+
Qd, Rd = c2d(sysd, Qc, Rc, opt=:c)
212213
Ld = lqr(sysd, Qd, Rd)
213214
sold = lsim(sysd, (x, t) -> -Ld*x, 0:Ts:10, x0 = x0)
214215
function cost(x, u, Q, R)

0 commit comments

Comments
 (0)