From: <par...@us...> - 2012-05-08 07:56:33
|
Revision: 10376 http://octave.svn.sourceforge.net/octave/?rev=10376&view=rev Author: paramaniac Date: 2012-05-08 07:56:26 +0000 (Tue, 08 May 2012) Log Message: ----------- control: list tf property 'inv', require discrete-time systems Modified Paths: -------------- trunk/octave-forge/main/control/inst/@tf/__property_names__.m trunk/octave-forge/main/control/inst/@tf/__set__.m Modified: trunk/octave-forge/main/control/inst/@tf/__property_names__.m =================================================================== --- trunk/octave-forge/main/control/inst/@tf/__property_names__.m 2012-05-07 13:38:26 UTC (rev 10375) +++ trunk/octave-forge/main/control/inst/@tf/__property_names__.m 2012-05-08 07:56:26 UTC (rev 10376) @@ -30,12 +30,14 @@ ## cell vector of tf-specific properties props = {"num"; "den"; - "tfvar"}; + "tfvar"; + "inv"}; ## cell vector of tf-specific assignable values vals = {"p-by-m cell array of row vectors (m = number of inputs)"; "p-by-m cell array of row vectors (p = number of outputs)"; - "string (usually s or z)"}; + "string (usually s or z)"; + "logical (true for negative powers of TF variable)"}; if (nargin == 1) [ltiprops, ltivals] = __property_names__ (sys.lti); Modified: trunk/octave-forge/main/control/inst/@tf/__set__.m =================================================================== --- trunk/octave-forge/main/control/inst/@tf/__set__.m 2012-05-07 13:38:26 UTC (rev 10375) +++ trunk/octave-forge/main/control/inst/@tf/__set__.m 2012-05-08 07:56:26 UTC (rev 10376) @@ -43,10 +43,12 @@ endif case "inv" - if (isscalar (val)) + if (! isdt (sys)) + error ("tf: set: property 'inv' requires discrete-time system"); + elseif (! isscalar (val)) + error ("tf: set: property 'inv' must be a scalar logical"); + else sys.inv = logical (val); - else - 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. |