From: <par...@us...> - 2012-06-29 08:14:38
|
Revision: 10704 http://octave.svn.sourceforge.net/octave/?rev=10704&view=rev Author: paramaniac Date: 2012-06-29 08:14:29 +0000 (Fri, 29 Jun 2012) Log Message: ----------- control-devel: support frequency domain datasets (2) Modified Paths: -------------- trunk/octave-forge/extra/control-devel/inst/@iddata/ifft.m trunk/octave-forge/extra/control-devel/inst/__slicot_identification__.m trunk/octave-forge/extra/control-devel/inst/arx.m trunk/octave-forge/extra/control-devel/inst/moen4.m Modified: trunk/octave-forge/extra/control-devel/inst/@iddata/ifft.m =================================================================== --- trunk/octave-forge/extra/control-devel/inst/@iddata/ifft.m 2012-06-29 07:33:00 UTC (rev 10703) +++ trunk/octave-forge/extra/control-devel/inst/@iddata/ifft.m 2012-06-29 08:14:29 UTC (rev 10704) @@ -53,6 +53,14 @@ return; endif + if (any (cellfun (@(w) w(1) >= eps, dat.w))) + error ("iddata: ifft: first frequency must be zero"); + endif + + if (any (cellfun (@(w) any (abs (diff (w, 2)) > 1e-4*w(2:end-1)), dat.w))) + error ("iddata: ifft: require linearly spaced frequency vectors"); + endif + [x, ~, ~, e] = size (dat); x = x(:); Modified: trunk/octave-forge/extra/control-devel/inst/__slicot_identification__.m =================================================================== --- trunk/octave-forge/extra/control-devel/inst/__slicot_identification__.m 2012-06-29 07:33:00 UTC (rev 10703) +++ trunk/octave-forge/extra/control-devel/inst/__slicot_identification__.m 2012-06-29 08:14:29 UTC (rev 10704) @@ -38,8 +38,8 @@ error ("ident: invalid method"); # should never happen endswitch - if (! isa (dat, "iddata")) - error ("%s: first argument must be an 'iddata' dataset", method); + if (! isa (dat, "iddata") || ! dat.timedomain) + error ("%s: first argument must be a time-domain 'iddata' dataset", method); endif if (nargin > 2) # ident (dat, ...) Modified: trunk/octave-forge/extra/control-devel/inst/arx.m =================================================================== --- trunk/octave-forge/extra/control-devel/inst/arx.m 2012-06-29 07:33:00 UTC (rev 10703) +++ trunk/octave-forge/extra/control-devel/inst/arx.m 2012-06-29 08:14:29 UTC (rev 10704) @@ -25,7 +25,7 @@ ## @strong{Inputs} ## @table @var ## @item dat -## iddata set containing the measurements. +## iddata set containing the measurements, i.e. time-domain signals. ## @item n ## The desired order of the resulting model @var{sys}. ## @item @dots{} @@ -89,8 +89,8 @@ print_usage (); endif - if (! isa (dat, "iddata")) - error ("arx: first argument must be an iddata dataset"); + if (! isa (dat, "iddata") || ! dat.timedomain) + error ("arx: first argument must be a time-domain iddata dataset"); endif if (is_real_scalar (varargin{1})) # arx (dat, n, ...) Modified: trunk/octave-forge/extra/control-devel/inst/moen4.m =================================================================== --- trunk/octave-forge/extra/control-devel/inst/moen4.m 2012-06-29 07:33:00 UTC (rev 10703) +++ trunk/octave-forge/extra/control-devel/inst/moen4.m 2012-06-29 08:14:29 UTC (rev 10704) @@ -27,7 +27,7 @@ ## @strong{Inputs} ## @table @var ## @item dat -## iddata set containing the measurements. +## iddata set containing the measurements, i.e. time-domain signals. ## @item n ## The desired order of the resulting state-space system @var{sys}. ## If not specified, @var{n} is chosen automatically according This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |