Skip to content

Commit 2b2de2b

Browse files
committed
use state names as output names when outfcn=None
1 parent feeb56a commit 2b2de2b

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

control/nlsys.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,9 @@ def __init__(self, updfcn, outfcn=None, params=None, **kwargs):
143143
self.outfcn = lambda t, x, u, params: np.zeros(0)
144144
elif self.noutputs is None and self.nstates is not None:
145145
self.noutputs = self.nstates
146+
if len(self.output_index) == 0:
147+
# Use state names for outputs
148+
self.output_index = self.state_index
146149
elif self.noutputs is not None and self.noutputs == self.nstates:
147150
# Number of outputs = number of states => all is OK
148151
pass

0 commit comments

Comments
 (0)