From: <par...@us...> - 2012-08-30 06:02:49
|
Revision: 10932 http://octave.svn.sourceforge.net/octave/?rev=10932&view=rev Author: paramaniac Date: 2012-08-30 06:02:40 +0000 (Thu, 30 Aug 2012) Log Message: ----------- control: support the selection of certain experiments when plotting datasets Modified Paths: -------------- trunk/octave-forge/main/control/NEWS trunk/octave-forge/main/control/inst/@iddata/plot.m Modified: trunk/octave-forge/main/control/NEWS =================================================================== --- trunk/octave-forge/main/control/NEWS 2012-08-29 23:18:40 UTC (rev 10931) +++ trunk/octave-forge/main/control/NEWS 2012-08-30 06:02:40 UTC (rev 10932) @@ -1,6 +1,15 @@ Summary of important user-visible changes for releases of the control package =============================================================================== +control-2.3.54 Release Date: 2012-xx-yy Release Manager: Lukas Reichlin +=============================================================================== + +** plot + A selection of experiments from iddata identification datasets can be + plotted by plot (dat, exp) instead of plot (dat(:,:,:,exp)). + + +=============================================================================== control-2.3.53 Release Date: 2012-08-27 Release Manager: Lukas Reichlin =============================================================================== Modified: trunk/octave-forge/main/control/inst/@iddata/plot.m =================================================================== --- trunk/octave-forge/main/control/inst/@iddata/plot.m 2012-08-29 23:18:40 UTC (rev 10931) +++ trunk/octave-forge/main/control/inst/@iddata/plot.m 2012-08-30 06:02:40 UTC (rev 10932) @@ -17,23 +17,37 @@ ## -*- texinfo -*- ## @deftypefn {Function File} plot (@var{dat}) +## @deftypefnx {Function File} plot (@var{dat}, @var{exp}) ## Plot signals of iddata identification datasets on the screen. ## The signals are plotted experiment-wise, either in time- or ## frequency-domain. For multi-experiment datasets, ## press any key to switch to the next experiment. ## If the plot of a single experiment should be saved by the -## @command{print} command, use @code{plot(dat(:,:,:,exp))}, +## @command{print} command, use @code{plot(dat,exp)}, ## where @var{exp} denotes the desired experiment. ## @end deftypefn ## Author: Lukas Reichlin <luk...@gm...> ## Created: February 2012 -## Version: 0.1 +## Version: 0.2 -function plot (dat) +function plot (dat, exp = ":") + if (nargin > 2) # nargin == 0 is handled by built-in plot + print_usage (); + endif + + if (nargin == 2 && ! is_real_vector (exp)) + error ("iddata: plot: second argument must be a vector of indices"); + endif + + expname = __labels__ (dat.expname, "exp"); + expname = expname(exp); + + idx = substruct ("()", {":", ":", ":", exp}); + dat = subsref (dat, idx); + [n, p, m, e] = size (dat); - expname = __labels__ (dat.expname, "exp"); if (dat.timedomain) if (m == 0) # time series This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |