8000 Propagate labels and names when converting between mimo/siso/simo · python-control/python-control@d744a54 · GitHub
[go: up one dir, main page]

Skip to content

Commit d744a54

Browse files
Propagate labels and names when converting between mimo/siso/simo
1 parent 56c72c7 commit d744a54

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

control/statesp.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1777,7 +1777,9 @@ def _mimo2siso(sys, input, output, warn_conversion=False):
17771777
new_B = sys.B[:, input]
17781778
new_C = sys.C[output, :]
17791779
new_D = sys.D[output, input]
1780-
sys = StateSpace(sys.A, new_B, new_C, new_D, sys.dt)
1780+
sys = StateSpace(sys.A, new_B, new_C, new_D, sys.dt,
1781+
name=sys.name,
1782+
inputs=sys.input_labels[input], outputs=sys.output_labels[output])
17811783

17821784
return sys
17831785

@@ -1826,7 +1828,9 @@ def _mimo2simo(sys, input, warn_conversion=False):
18261828
# Y = C*X + D*U
18271829
new_B = sys.B[:, input:input+1]
18281830
new_D = sys.D[:, input:input+1]
1829-
sys = StateSpace(sys.A, new_B, sys.C, new_D, sys.dt)
1831+
sys = StateSpace(sys.A, new_B, sys.C, new_D, sys.dt,
1832+
name=sys.name,
1833+
inputs=sys.input_labels[input], outputs=sys.output_labels)
18301834

18311835
return sys
18321836

0 commit comments

Comments
 (0)
0