Skip to content

Commit 3354fcf

Browse files
committed
* Added link to numpy vs MATLAB page in scipy docs
* Fixed a problem with import statements in rlocus (overwrote statesp.place)
1 parent 701e83e commit 3354fcf

4 files changed

Lines changed: 23 additions & 5 deletions

File tree

ChangeLog

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
2011-07-01 Richard Murray <murray@malabar.local>
2+
3+
* src/rlocus.py: modified scipy import to only import those
4+
functions that we actually use. This fixes a problem pointed out by
5+
Carsten Knoll (TU Dresden) where control.place could be overwritten
6+
by numpy.place (because of an "from scipy import *" in rlocus.py
7+
8+
* doc/intro.rst: Added link to scipy web page talking about the
9+
differences between numpy and MATLAB (contributed by Shuo Han).
10+
111
2011-06-25 Richard Murray <murray@malabar.local>
212

313
* src/xferfcn.py (TransferFunction._common_den): changed tolerance

doc/intro.rst

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@ contains some additional information about how to use the package
2121

2222
Some Differences from MATLAB
2323
----------------------------
24+
The python-control package makes use of NumPy and SciPy. A list of
25+
general differences between NumPy and MATLAB can be found here:
26+
27+
http://www.scipy.org/NumPy_for_Matlab_Users
28+
29+
In terms of the python-control package more specifically, here are
30+
some thing to keep in mind:
2431
* You must include commas in vectors. So [1 2 3] must be [1, 2, 3].
2532
* Functions that return multiple arguments use tuples
2633
* Can't use braces for collections; use tuples instead
@@ -30,16 +37,16 @@ Some Differences from MATLAB
3037

3138
Getting Started
3239
---------------
33-
1. Download the latest release from http:sf.net/projects/python-control/files.
40+
1. Download latest release from http://sf.net/projects/python-control/files.
3441
2. Untar the source code in a temporary directory and run 'python setup.py
3542
install' to build and install the code
3643
3. To see if things are working correctly, run ipython -pylab and run the
3744
script 'examples/secord-matlab.py'. This should generate a set response,
3845
Bode plot and Nyquist plot for a simple second order system.
3946
4. To see the commands that are available, run the following commands in
4047
ipython::
41-
>>> import control
42-
>>> ?control.matlab
48+
>>> import control
49+
>>> ?control.matlab
4350
5. If you want to have a MATLAB-like environment for running the control
4451
toolbox, use::
45-
>>> from control.matlab import *
52+
>>> from control.matlab import *

src/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
"""
5757

5858
# Import functions from within the control system library
59+
#! Should probably only import the exact functions we use...
5960
from xferfcn import *
6061
from statesp import *
6162
from freqplot import *

src/rlocus.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
# $Id$
4747

4848
# Packages used by this module
49-
from scipy import *
49+
from scipy import array, poly1d, row_stack, zeros_like
5050
import scipy.signal # signal processing toolbox
5151
import pylab # plotting routines
5252
import xferfcn # transfer function manipulation

0 commit comments

Comments
 (0)