From: <par...@us...> - 2011-11-18 16:53:50
|
Revision: 9134 http://octave.svn.sourceforge.net/octave/?rev=9134&view=rev Author: paramaniac Date: 2011-11-18 16:53:44 +0000 (Fri, 18 Nov 2011) Log Message: ----------- control-devel: add draft code Modified Paths: -------------- trunk/octave-forge/extra/control-devel/inst/bstmodred.m Added Paths: ----------- trunk/octave-forge/extra/control-devel/devel/opt2cell.m trunk/octave-forge/extra/control-devel/devel/options.m Added: trunk/octave-forge/extra/control-devel/devel/opt2cell.m =================================================================== --- trunk/octave-forge/extra/control-devel/devel/opt2cell.m (rev 0) +++ trunk/octave-forge/extra/control-devel/devel/opt2cell.m 2011-11-18 16:53:44 UTC (rev 9134) @@ -0,0 +1,12 @@ +function c = opt2cell (opt) + + if (! isstruct (opt)) + error ("opt2cell: argument must be a struct"); + endif + + key = fieldnames (opt); + val = struct2cell (opt); + + c = [key.'; val.'](:); # reshape to {key1; val1; key2; val2; ...} + +endfunction \ No newline at end of file Added: trunk/octave-forge/extra/control-devel/devel/options.m =================================================================== --- trunk/octave-forge/extra/control-devel/devel/options.m (rev 0) +++ trunk/octave-forge/extra/control-devel/devel/options.m 2011-11-18 16:53:44 UTC (rev 9134) @@ -0,0 +1,8 @@ +function opt = options (varargin) + + key = reshape (varargin(1:2:end-1), [], 1); + val = reshape (varargin(2:2:end), [], 1); + + opt = cell2struct (val, key, 1) + +endfunction \ No newline at end of file Modified: trunk/octave-forge/extra/control-devel/inst/bstmodred.m =================================================================== --- trunk/octave-forge/extra/control-devel/inst/bstmodred.m 2011-11-18 14:23:19 UTC (rev 9133) +++ trunk/octave-forge/extra/control-devel/inst/bstmodred.m 2011-11-18 16:53:44 UTC (rev 9134) @@ -16,8 +16,12 @@ ## along with LTI Syncope. If not, see <http://www.gnu.org/licenses/>. ## -*- texinfo -*- -## @deftypefn{Function File} {[@var{sysr}, @var{nr}] =} hnamodred (@var{sys}, @dots{}) -## Model order reduction by frequency weighted optimal Hankel-norm approximation method. +## @deftypefn{Function File} {[@var{sysr}, @var{nr}] =} bstmodred (@var{sys}, @dots{}) +## Model order reduction by Balanced Stochastic Truncation method. +## Uses the stochastic balancing approach in conjunction with the square-root or +## the balancing-free square-root Balance & Truncate (B&T) +## or Singular Perturbation Approximation (SPA) model reduction +## methods for the ALPHA-stable part of the system. ## ## @strong{Inputs} ## @table @var This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |