# HG changeset patch # User paramaniac # Date 1333366572 0 # Node ID 4f74edffa72cf5cb039b91179be39c87f75d2f6b # Parent 061a3d0c77334ca8402214ce5b5d7b0663efe9b2 control-devel: improve plot for multi-experiment iddata diff -r 061a3d0c7733 -r 4f74edffa72c extra/control-devel/devel/PowerPlantTest.m --- a/extra/control-devel/devel/PowerPlantTest.m Mon Apr 02 11:34:53 2012 +0000 +++ b/extra/control-devel/devel/PowerPlantTest.m Mon Apr 02 11:36:12 2012 +0000 @@ -65,7 +65,7 @@ % ldwork = [401, 802, 1203, 1604] % warning: implicit conversion from real matrix to real scalar -ldwork = [802, 1203, 1604] +ldwork = [802, 1203, 1604, 3000, 10000] r = arrayfun (@(x) identtest (dat, 10, 8, x), ldwork, 'uniformoutput', false); diff -r 061a3d0c7733 -r 4f74edffa72c extra/control-devel/inst/@iddata/plot.m --- a/extra/control-devel/inst/@iddata/plot.m Mon Apr 02 11:34:53 2012 +0000 +++ b/extra/control-devel/inst/@iddata/plot.m Mon Apr 02 11:36:12 2012 +0000 @@ -26,21 +26,32 @@ function plot (dat) - [n, p, m, e] = size (dat) + [n, p, m, e] = size (dat); + expname = __labels__ (dat.expname, "exp"); if (m == 0) # time series for k = 1 : e + if (k > 1) + pause + endif plot (dat.y{k}) - hold on + title (expname{k}) + % hold on endfor else # inputs present for k = 1 : e + if (k > 1) + pause + endif subplot (2, 1, 1) plot (dat.y{k}) - hold on + title (expname{k}) + legend (__labels__ (dat.outname, "y"){:}) + % hold on subplot (2, 1, 2) stairs (dat.u{k}) - hold on + legend (__labels__ (dat.inname, "u"){:}) + % hold on endfor endif