From: <par...@us...> - 2012-06-22 15:16:51
|
Revision: 10670 http://octave.svn.sourceforge.net/octave/?rev=10670&view=rev Author: paramaniac Date: 2012-06-22 15:16:45 +0000 (Fri, 22 Jun 2012) Log Message: ----------- control-devel: handle tsam in cat method Modified Paths: -------------- trunk/octave-forge/extra/control-devel/inst/@iddata/cat.m Modified: trunk/octave-forge/extra/control-devel/inst/@iddata/cat.m =================================================================== --- trunk/octave-forge/extra/control-devel/inst/@iddata/cat.m 2012-06-22 15:15:16 UTC (rev 10669) +++ trunk/octave-forge/extra/control-devel/inst/@iddata/cat.m 2012-06-22 15:16:45 UTC (rev 10670) @@ -82,7 +82,8 @@ ## store all datasets in a single struct 'tmp' ## tmp is not a valid iddata set anymore, - ## but it doesn't matter, we want just a struct + ## but it doesn't matter, we want just a + ## temporary struct containing all the data tmp = cellfun (@iddata, varargin); [n, p, m, e] = cellfun (@size, varargin, "uniformoutput", false); @@ -91,6 +92,7 @@ ## default values for metadata ## some of them are overwritten in the switch statement below + tsam = tmp(1).tsam; expname = tmp(1).expname; outname = tmp(1).outname; outunit = tmp(1).outunit; @@ -128,13 +130,14 @@ y = vertcat (tmp.y); u = vertcat (tmp.u); + tsam = vertcat (tmp.tsam); expname = vertcat (tmp.expname); otherwise error ("iddata: cat: '%d' is an invalid dimension", dim); endswitch - dat = iddata (y, u); + dat = iddata (y, u, tsam); ## copy metadata dat.expname = expname; @@ -143,7 +146,7 @@ dat.inname = inname; dat.inunit = inunit; - % TODO: handle tsam, w + % TODO: handle w endfunction This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |