|
From: <mur...@us...> - 2011-07-02 01:55:56
|
Revision: 166
http://python-control.svn.sourceforge.net/python-control/?rev=166&view=rev
Author: murrayrm
Date: 2011-07-02 01:55:50 +0000 (Sat, 02 Jul 2011)
Log Message:
-----------
* Added link to numpy vs MATLAB page in scipy docs
* Fixed a problem with import statements in rlocus (overwrote statesp.place)
Modified Paths:
--------------
trunk/ChangeLog
trunk/doc/intro.rst
trunk/src/__init__.py
trunk/src/rlocus.py
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-06-26 02:44:09 UTC (rev 165)
+++ trunk/ChangeLog 2011-07-02 01:55:50 UTC (rev 166)
@@ -1,3 +1,13 @@
+2011-07-01 Richard Murray <mu...@ma...>
+
+ * src/rlocus.py: modified scipy import to only import those
+ functions that we actually use. This fixes a problem pointed out by
+ Carsten Knoll (TU Dresden) where control.place could be overwritten
+ by numpy.place (because of an "from scipy import *" in rlocus.py
+
+ * doc/intro.rst: Added link to scipy web page talking about the
+ differences between numpy and MATLAB (contributed by Shuo Han).
+
2011-06-25 Richard Murray <mu...@ma...>
* src/xferfcn.py (TransferFunction._common_den): changed tolerance
Modified: trunk/doc/intro.rst
===================================================================
--- trunk/doc/intro.rst 2011-06-26 02:44:09 UTC (rev 165)
+++ trunk/doc/intro.rst 2011-07-02 01:55:50 UTC (rev 166)
@@ -21,6 +21,13 @@
Some Differences from MATLAB
----------------------------
+The python-control package makes use of NumPy and SciPy. A list of
+general differences between NumPy and MATLAB can be found here:
+
+ http://www.scipy.org/NumPy_for_Matlab_Users
+
+In terms of the python-control package more specifically, here are
+some thing to keep in mind:
* You must include commas in vectors. So [1 2 3] must be [1, 2, 3].
* Functions that return multiple arguments use tuples
* Can't use braces for collections; use tuples instead
@@ -30,7 +37,7 @@
Getting Started
---------------
-1. Download the latest release from http:sf.net/projects/python-control/files.
+1. Download latest release from http://sf.net/projects/python-control/files.
2. Untar the source code in a temporary directory and run 'python setup.py
install' to build and install the code
3. To see if things are working correctly, run ipython -pylab and run the
@@ -38,8 +45,8 @@
Bode plot and Nyquist plot for a simple second order system.
4. To see the commands that are available, run the following commands in
ipython::
- >>> import control
- >>> ?control.matlab
+ >>> import control
+ >>> ?control.matlab
5. If you want to have a MATLAB-like environment for running the control
toolbox, use::
- >>> from control.matlab import *
+ >>> from control.matlab import *
Modified: trunk/src/__init__.py
===================================================================
--- trunk/src/__init__.py 2011-06-26 02:44:09 UTC (rev 165)
+++ trunk/src/__init__.py 2011-07-02 01:55:50 UTC (rev 166)
@@ -56,6 +56,7 @@
"""
# Import functions from within the control system library
+#! Should probably only import the exact functions we use...
from xferfcn import *
from statesp import *
from freqplot import *
Modified: trunk/src/rlocus.py
===================================================================
--- trunk/src/rlocus.py 2011-06-26 02:44:09 UTC (rev 165)
+++ trunk/src/rlocus.py 2011-07-02 01:55:50 UTC (rev 166)
@@ -46,7 +46,7 @@
# $Id$
# Packages used by this module
-from scipy import *
+from scipy import array, poly1d, row_stack, zeros_like
import scipy.signal # signal processing toolbox
import pylab # plotting routines
import xferfcn # transfer function manipulation
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|