@@ -1103,15 +1103,18 @@ def rlocus(sys, klist = None, **keywords):
11031103 """Root locus plot
11041104
11051105 The root-locus plot has a callback function that prints pole location,
1106- gain and damping to the Python consol on mouseclicks on the root-locus
1107- graph.
1106+ gain and damping to the Python console on mouseclicks on the root-locus
1107+ graph.
11081108
11091109 Parameters
11101110 ----------
11111111 sys: StateSpace or TransferFunction
11121112 Linear system
11131113 klist:
11141114 optional list of gains
1115+
1116+ Keyword parameters
1117+ ------------------
11151118 xlim : control of x-axis range, normally with tuple, for
11161119 other options, see matplotlib.axes
11171120 ylim : control of y-axis range
@@ -1165,7 +1168,7 @@ def margin(*args):
11651168 margin: no magnitude crossings found
11661169
11671170 .. todo::
1168- better ecample system!
1171+ better example system!
11691172
11701173 #>>> gm, pm, wg, wp = margin(mag, phase, w)
11711174 """
@@ -1178,7 +1181,7 @@ def margin(*args):
11781181 raise ValueError ("Margin needs 1 or 3 arguments; received %i."
11791182 % len (args ))
11801183
1181- return margin [0 ], margin [1 ], margin [4 ], margin [3 ]
1184+ return margin [0 ], margin [1 ], margin [3 ], margin [4 ]
11821185
11831186def dcgain (* args ):
11841187 '''
@@ -1279,10 +1282,11 @@ def step(sys, T=None, X0=0., input=0, output=None, **keywords):
12791282 '''
12801283 Step response of a linear system
12811284
1282- If the system has multiple inputs or outputs (MIMO), one input and one
1283- output have to be selected for the simulation. The parameters `input`
1284- and `output` do this. All other inputs are set to 0, all other outputs
1285- are ignored.
1285+ If the system has multiple inputs or outputs (MIMO), one input has
1286+ to be selected for the simulation. Optionally, one output may be
1287+ selected. If no selection is made for the output, all outputs are
1288+ given. The parameters `input` and `output` do this. All other
1289+ inputs are set to 0, all other outputs are ignored.
12861290
12871291 Parameters
12881292 ----------
@@ -1301,7 +1305,7 @@ def step(sys, T=None, X0=0., input=0, output=None, **keywords):
13011305 Index of the input that will be used in this simulation.
13021306
13031307 output: int
1304- Index of the output that will be used in this simulation.
1308+ If given, index of the output that is returned by this simulation.
13051309
13061310 **keywords:
13071311 Additional keyword arguments control the solution algorithm for the
@@ -1326,19 +1330,21 @@ def step(sys, T=None, X0=0., input=0, output=None, **keywords):
13261330 Examples
13271331 --------
13281332 >>> yout, T = step(sys, T, X0)
1333+
13291334 '''
13301335 T , yout = timeresp .step_response (sys , T , X0 , input , output ,
1331- transpose = True , ** keywords )
1336+ transpose = True , ** keywords )
13321337 return yout , T
13331338
1334- def impulse (sys , T = None , input = 0 , output = 0 , ** keywords ):
1339+ def impulse (sys , T = None , input = 0 , output = None , ** keywords ):
13351340 '''
13361341 Impulse response of a linear system
13371342
1338- If the system has multiple inputs or outputs (MIMO), one input and
1339- one output must be selected for the simulation. The parameters
1340- `input` and `output` do this. All other inputs are set to 0, all
1341- other outputs are ignored.
1343+ If the system has multiple inputs or outputs (MIMO), one input has
1344+ to be selected for the simulation. Optionally, one output may be
1345+ selected. If no selection is made for the output, all outputs are
1346+ given. The parameters `input` and `output` do this. All other
1347+ inputs are set to 0, all other outputs are ignored.
13421348
13431349 Parameters
13441350 ----------
@@ -1381,14 +1387,13 @@ def impulse(sys, T=None, input=0, output=0, **keywords):
13811387 transpose = True , ** keywords )
13821388 return yout , T
13831389
1384- def initial (sys , T = None , X0 = 0. , input = 0 , output = 0 , ** keywords ):
1390+ def initial (sys , T = None , X0 = 0. , input = None , output = None , ** keywords ):
13851391 '''
13861392 Initial condition response of a linear system
13871393
1388- If the system has multiple inputs or outputs (MIMO), one input and one
1389- output have to be selected for the simulation. The parameters `input`
1390- and `output` do this. All other inputs are set to 0, all other outputs
1391- are ignored.
1394+ If the system has multiple outputs (?IMO), optionally, one output
1395+ may be selected. If no selection is made for the output, all
1396+ outputs are given.
13921397
13931398 Parameters
13941399 ----------
@@ -1404,10 +1409,11 @@ def initial(sys, T=None, X0=0., input=0, output=0, **keywords):
14041409 Numbers are converted to constant arrays with the correct shape.
14051410
14061411 input: int
1407- Index of the input that will be used in this simulation.
1412+ This input is ignored, but present for compatibility with step
1413+ and impulse.
14081414
14091415 output: int
1410- Index of the output that will be used in this simulation.
1416+ If given, index of the output that is returned by this simulation.
14111417
14121418 **keywords:
14131419 Additional keyword arguments control the solution algorithm for the
@@ -1432,9 +1438,10 @@ def initial(sys, T=None, X0=0., input=0, output=0, **keywords):
14321438 Examples
14331439 --------
14341440 >>> T, yout = initial(sys, T, X0)
1441+
14351442 '''
1436- T , yout = timeresp .initial_response (sys , T , X0 , input , output ,
1437- transpose = True , ** keywords )
1443+ T , yout = timeresp .initial_response (sys , T , X0 , output = output ,
1444+ transpose = True , ** keywords )
14381445 return yout , T
14391446
14401447def lsim (sys , U = 0. , T = None , X0 = 0. , ** keywords ):
0 commit comments