|
From: <kk...@us...> - 2011-02-08 22:04:03
|
Revision: 36
http://python-control.svn.sourceforge.net/python-control/?rev=36&view=rev
Author: kkchen
Date: 2011-02-08 22:03:57 +0000 (Tue, 08 Feb 2011)
Log Message:
-----------
Added test that ctrb and obsv are dual. Also removed accidental extra .hgignore that I shouldn't have added.
Steven Brunton <sbr...@pr...>
Modified Paths:
--------------
branches/control-0.4a/src/TestStatefbk.py
Modified: branches/control-0.4a/src/TestStatefbk.py
===================================================================
--- branches/control-0.4a/src/TestStatefbk.py 2011-02-08 20:57:52 UTC (rev 35)
+++ branches/control-0.4a/src/TestStatefbk.py 2011-02-08 22:03:57 UTC (rev 36)
@@ -32,6 +32,15 @@
Wotrue = N.matrix("5. 6.; 7. 8.; 23. 34.; 31. 46.")
Wo = obsv(A,C)
N.testing.assert_array_almost_equal(Wo, Wotrue)
+
+ def testCtrbObsvDuality(self):
+ A = N.matrix("1.2 -2.3; 3.4 -4.5")
+ B = N.matrix("5.8 6.9; 8. 9.1")
+ Wc = ctrb(A,B);
+ A = N.transpose(A)
+ C = N.transpose(B)
+ Wo = N.transpose(obsv(A,C));
+ N.testing.assert_array_almost_equal(Wc,Wo)
if __name__ == '__main__':
unittest.main()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|