From: <par...@us...> - 2012-02-15 19:02:52
|
Revision: 9627 http://octave.svn.sourceforge.net/octave/?rev=9627&view=rev Author: paramaniac Date: 2012-02-15 19:02:46 +0000 (Wed, 15 Feb 2012) Log Message: ----------- control-devel: work on iddata class (2) Modified Paths: -------------- trunk/octave-forge/extra/control-devel/inst/@iddata/iddata.m trunk/octave-forge/extra/control-devel/inst/@iddata/size.m Modified: trunk/octave-forge/extra/control-devel/inst/@iddata/iddata.m =================================================================== --- trunk/octave-forge/extra/control-devel/inst/@iddata/iddata.m 2012-02-15 17:57:34 UTC (rev 9626) +++ trunk/octave-forge/extra/control-devel/inst/@iddata/iddata.m 2012-02-15 19:02:46 UTC (rev 9627) @@ -20,10 +20,12 @@ outname = repmat ({""}, p, 1); inname = repmat ({""}, m, 1); + exname = repmat ({""}, e, 1); - dat = struct ("y", y, "outname", {outname}, "outunit", {outname}, - "u", u, "inname", {inname}, "inunit", {inname}, + dat = struct ("y", {y}, "outname", {outname}, "outunit", {outname}, + "u", {u}, "inname", {inname}, "inunit", {inname}, "tsam", tsam, "timeunit", {""}, + "exname", {exname}, "name", "", "notes", {{}}, "userdata", []); dat = class (dat, "iddata"); Modified: trunk/octave-forge/extra/control-devel/inst/@iddata/size.m =================================================================== --- trunk/octave-forge/extra/control-devel/inst/@iddata/size.m 2012-02-15 17:57:34 UTC (rev 9626) +++ trunk/octave-forge/extra/control-devel/inst/@iddata/size.m 2012-02-15 19:02:46 UTC (rev 9627) @@ -54,10 +54,19 @@ print_usage (); endif + n = cellfun (@rows, dat.y).'; p = numel (dat.outname); m = numel (dat.inname); - n = rows (dat.y); - + e = numel (dat.y); + + if (nargout > 1) + ret = n; + varargout = {p; m; e}; + else + ret = [sum(n), p, m, e]; + endif + +%{ switch (dim) case 0 switch (nargout) @@ -94,5 +103,6 @@ otherwise print_usage (); endswitch +%} endfunction This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |