Skip to content

Commit 38514c9

Browse files
committed
Correct docstrings in matlab time response functions
Fixes #35
1 parent b798bfa commit 38514c9

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

control/matlab.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1380,7 +1380,7 @@ def impulse(sys, T=None, input=0, output=None, **keywords):
13801380
13811381
Examples
13821382
--------
1383-
>>> T, yout = impulse(sys, T)
1383+
>>> yout, T = impulse(sys, T)
13841384
'''
13851385
T, yout = timeresp.impulse_response(sys, T, 0, input, output,
13861386
transpose = True, **keywords)
@@ -1389,11 +1389,11 @@ def impulse(sys, T=None, input=0, output=None, **keywords):
13891389
def initial(sys, T=None, X0=0., input=None, output=None, **keywords):
13901390
'''
13911391
Initial condition response of a linear system
1392-
1392+
13931393
If the system has multiple outputs (?IMO), optionally, one output
13941394
may be selected. If no selection is made for the output, all
13951395
outputs are given.
1396-
1396+
13971397
Parameters
13981398
----------
13991399
sys: StateSpace, or TransferFunction
@@ -1436,7 +1436,7 @@ def initial(sys, T=None, X0=0., input=None, output=None, **keywords):
14361436
14371437
Examples
14381438
--------
1439-
>>> T, yout = initial(sys, T, X0)
1439+
>>> yout, T = initial(sys, T, X0)
14401440
14411441
'''
14421442
T, yout = timeresp.initial_response(sys, T, X0, output=output,
@@ -1491,7 +1491,7 @@ def lsim(sys, U=0., T=None, X0=0., **keywords):
14911491
14921492
Examples
14931493
--------
1494-
>>> T, yout, xout = lsim(sys, U, T, X0)
1494+
>>> yout, T, xout = lsim(sys, U, T, X0)
14951495
'''
14961496
T, yout, xout = timeresp.forced_response(sys, T, U, X0,
14971497
transpose = True, **keywords)
@@ -1553,7 +1553,7 @@ def c2d(sysc, Ts, method='zoh'):
15531553
Sample time for the conversion
15541554
15551555
method: string, optional
1556-
Method to be applied,
1556+
Method to be applied,
15571557
'zoh' Zero-order hold on the inputs (default)
15581558
'foh' First-order hold, currently not implemented
15591559
'impulse' Impulse-invariant discretization, currently not implemented
@@ -1565,4 +1565,3 @@ def c2d(sysc, Ts, method='zoh'):
15651565
if isinstance(sysc, StateSpace) and not isinstance(sysd, StateSpace):
15661566
return _convertToStateSpace(sysd)
15671567
return sysd
1568-

0 commit comments

Comments
 (0)