Skip to content

Commit 6b5f7a0

Browse files
authored
Merge pull request #206 from JuliaControl/docfix
Docfix
2 parents ba2a212 + 341a617 commit 6b5f7a0

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

src/synthesis.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ Q = I
2525
R = I
2626
L = lqr(sys,Q,R)
2727
28-
u(t,x) = -L*x # Form control law,
28+
u(x,t) = -L*x # Form control law,
2929
t=0:0.1:5
3030
x0 = [1,0]
31-
y, t, x, uout = lsim(sys,u,t,x0)
32-
plot(t,x, lab=["Position", "Velocity"]', xlabel="Time [s]")
31+
y, t, x, uout = lsim(sys,u,t,x0=x0)
32+
plot(t,x, lab=["Position" "Velocity"], xlabel="Time [s]")
3333
```
3434
"""
3535
function lqr(A, B, Q, R)
@@ -87,11 +87,11 @@ Q = I
8787
R = I
8888
L = dlqr(A,B,Q,R) # lqr(sys,Q,R) can also be used
8989
90-
u(t,x) = -L*x # Form control law,
90+
u(x,t) = -L*x # Form control law,
9191
t=0:h:5
9292
x0 = [1,0]
93-
y, t, x, uout = lsim(sys,u,t,x0)
94-
plot(t,x, lab=["Position", "Velocity"]', xlabel="Time [s]")
93+
y, t, x, uout = lsim(sys,u,t,x0=x0)
94+
plot(t,x, lab=["Position" "Velocity"], xlabel="Time [s]")
9595
```
9696
"""
9797
function dlqr(A, B, Q, R)

0 commit comments

Comments
 (0)