8000 Merge pull request #854 from bnavigator/iosys-doc-example · python-control/python-control@1f837a5 · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit 1f837a5

Browse files
authored
Merge pull request #854 from bnavigator/iosys-doc-example
iosys doc example: Use array types updatefcn input/output
2 parents e6ba790 + dda5258 commit 1f837a5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/iosys.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,13 @@ We begin by defining the dynamics of the system
7979
L = x[1]
8080
8181
# Compute the control action (only allow addition of food)
82-
u_0 = u if u > 0 else 0
82+
u_0 = u[0] if u[0] > 0 else 0
8383
8484
# Compute the discrete updates
8585
dH = (r + u_0) * H * (1 - H/k) - (a * H * L)/(c + H)
8686
dL = b * (a * H * L)/(c + H) - d * L
8787
88-
return [dH, dL]
88+
return np.array([dH, dL])
8989
9090
We now create an input/output system using these dynamics:
9191

0 commit comments

Comments
 (0)
0