From: <par...@us...> - 2012-05-07 03:28:01
|
Revision: 10371 http://octave.svn.sourceforge.net/octave/?rev=10371&view=rev Author: paramaniac Date: 2012-05-07 03:27:54 +0000 (Mon, 07 May 2012) Log Message: ----------- control: handle LTI property 'inv' in get & set routines Modified Paths: -------------- trunk/octave-forge/main/control/inst/@tf/__get__.m trunk/octave-forge/main/control/inst/@tf/__set__.m Modified: trunk/octave-forge/main/control/inst/@tf/__get__.m =================================================================== --- trunk/octave-forge/main/control/inst/@tf/__get__.m 2012-05-06 20:20:20 UTC (rev 10370) +++ trunk/octave-forge/main/control/inst/@tf/__get__.m 2012-05-07 03:27:54 UTC (rev 10371) @@ -1,4 +1,4 @@ -## Copyright (C) 2009, 2010 Lukas F. Reichlin +## Copyright (C) 2009, 2010, 2012 Lukas F. Reichlin ## ## This file is part of LTI Syncope. ## @@ -20,7 +20,7 @@ ## Author: Lukas Reichlin <luk...@gm...> ## Created: October 2009 -## Version: 0.2 +## Version: 0.3 function val = __get__ (sys, prop) @@ -34,6 +34,9 @@ case {"tfvar", "variable"} val = sys.tfvar; + case "inv" + val = sys.inv; + otherwise error ("tf: get: invalid property name"); endswitch Modified: trunk/octave-forge/main/control/inst/@tf/__set__.m =================================================================== --- trunk/octave-forge/main/control/inst/@tf/__set__.m 2012-05-06 20:20:20 UTC (rev 10370) +++ trunk/octave-forge/main/control/inst/@tf/__set__.m 2012-05-07 03:27:54 UTC (rev 10371) @@ -43,10 +43,10 @@ endif case "inv" - if (islogical (val)) + if (isscalar (val)) sys.inv = logical (val); else - error ("tf: set: property 'inv' must be a logical"); + error ("tf: set: property 'inv' must be a scalar logical"); endif otherwise This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |