We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents ba2a212 + 341a617 commit 6b5f7a0Copy full SHA for 6b5f7a0
1 file changed
src/synthesis.jl
@@ -25,11 +25,11 @@ Q = I
25
R = I
26
L = lqr(sys,Q,R)
27
28
-u(t,x) = -L*x # Form control law,
+u(x,t) = -L*x # Form control law,
29
t=0:0.1:5
30
x0 = [1,0]
31
-y, t, x, uout = lsim(sys,u,t,x0)
32
-plot(t,x, lab=["Position", "Velocity"]', xlabel="Time [s]")
+y, t, x, uout = lsim(sys,u,t,x0=x0)
+plot(t,x, lab=["Position" "Velocity"], xlabel="Time [s]")
33
```
34
"""
35
function lqr(A, B, Q, R)
@@ -87,11 +87,11 @@ Q = I
87
88
L = dlqr(A,B,Q,R) # lqr(sys,Q,R) can also be used
89
90
91
t=0:h:5
92
93
94
95
96
97
function dlqr(A, B, Q, R)
0 commit comments