From: <par...@us...> - 2012-06-22 09:08:17
|
Revision: 10657 http://octave.svn.sourceforge.net/octave/?rev=10657&view=rev Author: paramaniac Date: 2012-06-22 09:08:11 +0000 (Fri, 22 Jun 2012) Log Message: ----------- control-devel: specify common tsam for all experiments, improve doc Modified Paths: -------------- trunk/octave-forge/extra/control-devel/INDEX trunk/octave-forge/extra/control-devel/inst/@iddata/iddata.m trunk/octave-forge/extra/control-devel/inst/__adjust_iddata_tsam__.m Modified: trunk/octave-forge/extra/control-devel/INDEX =================================================================== --- trunk/octave-forge/extra/control-devel/INDEX 2012-06-22 05:34:37 UTC (rev 10656) +++ trunk/octave-forge/extra/control-devel/INDEX 2012-06-22 09:08:11 UTC (rev 10657) @@ -7,13 +7,11 @@ @iddata/diff @iddata/fft @iddata/get - @iddata/horzcat @iddata/ifft @iddata/merge @iddata/plot @iddata/set @iddata/size - @iddata/vertcat System Identification arx fitfrd Modified: trunk/octave-forge/extra/control-devel/inst/@iddata/iddata.m =================================================================== --- trunk/octave-forge/extra/control-devel/inst/@iddata/iddata.m 2012-06-22 05:34:37 UTC (rev 10656) +++ trunk/octave-forge/extra/control-devel/inst/@iddata/iddata.m 2012-06-22 09:08:11 UTC (rev 10657) @@ -42,6 +42,10 @@ ## and n(i) the individual number of samples for each experiment. ## @item tsam ## Sampling time. If not specified, default value -1 (unspecified) is taken. +## For multi-experiment data, @var{tsam} becomes a +## e-by-1 or 1-by-e cell vector containing individual +## sampling times for each experiment. If a scalar @var{tsam} +## is provided, then all experiments have the same sampling time. ## @item @dots{} ## Optional pairs of properties and values. ## @end table Modified: trunk/octave-forge/extra/control-devel/inst/__adjust_iddata_tsam__.m =================================================================== --- trunk/octave-forge/extra/control-devel/inst/__adjust_iddata_tsam__.m 2012-06-22 05:34:37 UTC (rev 10656) +++ trunk/octave-forge/extra/control-devel/inst/__adjust_iddata_tsam__.m 2012-06-22 09:08:11 UTC (rev 10657) @@ -40,9 +40,13 @@ error ("iddata: invalid sampling time"); endif - if (numel (tsam) != e) + nt = numel (tsam); + + if (nt == 1 && e > 1) + tsam = repmat (tsam, e, 1); + elseif (nt != e) error ("iddata: there are %d experiments, but only %d sampling times", \ - e, numel (tsam)); + e, nt); endif endfunction This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |