Skip to content

Commit 7344b1e

Browse files
committed
backed out change to rlocus default arguments (see ChangeLog)
1 parent 55ba0e2 commit 7344b1e

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

ChangeLog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
2012-10-19 Richard Murray <murray@dn0a1594a2.sunet>
2+
3+
* src/matlab.py (rlocus): reverted change in default argument
4+
processing for klist. This has some negative consequences:
5+
http://www.deadlybloodyserious.com/2008/05/default-argument-blunders/
6+
17
2012-10-18 Richard Murray <murray@dn0a1594a2.sunet>
28

39
* src/freqplot.py (gangof4_plot, nyquist_plot): discrete time

src/matlab.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1005,7 +1005,7 @@ def ngrid():
10051005
ngrid.__doc__ = re.sub('nichols_grid', 'ngrid', nichols_grid.__doc__)
10061006

10071007
# Root locus plot
1008-
def rlocus(sys, klist = logspace(-3, 3), **keywords):
1008+
def rlocus(sys, klist = None, **keywords):
10091009
"""Root locus plot
10101010
10111011
Parameters
@@ -1023,7 +1023,9 @@ def rlocus(sys, klist = logspace(-3, 3), **keywords):
10231023
list of gains used to compute roots
10241024
"""
10251025
from rlocus import root_locus
1026-
#! TODO: update with a smart calculation of the gains when using default value for klist.
1026+
#! TODO: update with a smart calculation of the gains using sys poles/zeros
1027+
if klist == None:
1028+
klist = logspace(-3, 3)
10271029

10281030
rlist = root_locus(sys, klist, **keywords)
10291031
return rlist, klist

0 commit comments

Comments
 (0)