Skip to content

Commit f63323c

Browse files
committed
Correct plotting of robust MIMO example
Done by passing `squeeze=True` to `step_response`.
1 parent 1502d38 commit f63323c

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

examples/robust_mimo.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,8 @@ def analysis():
5454
g = plant()
5555

5656
t = np.linspace(0, 10, 101)
57-
_, yu1 = step_response(g, t, input=0)
58-
_, yu2 = step_response(g, t, input=1)
59-
60-
yu1 = yu1
61-
yu2 = yu2
57+
_, yu1 = step_response(g, t, input=0, squeeze=True)
58+
_, yu2 = step_response(g, t, input=1, squeeze=True)
6259

6360
# linear system, so scale and sum previous results to get the
6461
# [1,-1] response
@@ -112,8 +109,8 @@ def synth(wb1, wb2):
112109

113110
def step_opposite(g, t):
114111
"""reponse to step of [-1,1]"""
115-
_, yu1 = step_response(g, t, input=0)
116-
_, yu2 = step_response(g, t, input=1)
112+
_, yu1 = step_response(g, t, input=0, squeeze=True)
113+
_, yu2 = step_response(g, t, input=1, squeeze=True)
117114
return yu1 - yu2
118115

119116

0 commit comments

Comments
 (0)