From: <par...@us...> - 2012-08-04 12:18:43
|
Revision: 10814 http://octave.svn.sourceforge.net/octave/?rev=10814&view=rev Author: paramaniac Date: 2012-08-04 12:18:37 +0000 (Sat, 04 Aug 2012) Log Message: ----------- control-devel: touch up plot command Modified Paths: -------------- trunk/octave-forge/extra/control-devel/inst/@iddata/plot.m Modified: trunk/octave-forge/extra/control-devel/inst/@iddata/plot.m =================================================================== --- trunk/octave-forge/extra/control-devel/inst/@iddata/plot.m 2012-08-04 10:59:11 UTC (rev 10813) +++ trunk/octave-forge/extra/control-devel/inst/@iddata/plot.m 2012-08-04 12:18:37 UTC (rev 10814) @@ -17,7 +17,13 @@ ## -*- texinfo -*- ## @deftypefn {Function File} plot (@var{dat}) -## Plot iddata sets. +## 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))}, +## where @var{exp} denotes the desired experiment. ## @end deftypefn ## Author: Lukas Reichlin <luk...@gm...> @@ -38,7 +44,8 @@ plot (dat.y{k}) title (expname{k}) legend (__labels__ (dat.outname, "y"){:}) - % hold on + xlabel ("Time") + ylabel ("Output Signal") endfor else # inputs present for k = 1 : e @@ -49,11 +56,12 @@ plot (dat.y{k}) title (expname{k}) legend (__labels__ (dat.outname, "y"){:}) - % hold on + ylabel ("Output Signal") subplot (2, 1, 2) stairs (dat.u{k}) legend (__labels__ (dat.inname, "u"){:}) - % hold on + xlabel ("Time") + ylabel ("Input Signal") endfor endif else # frequency domain @@ -66,6 +74,8 @@ xlim ([dat.w{k}(1), dat.w{k}(end)]) title (expname{k}) legend (__labels__ (dat.outname, "y"){:}) + xlabel ("Frequency") + ylabel ("Output Magnitude [dB]") endfor else # inputs present for k = 1 : e @@ -77,16 +87,17 @@ xlim ([dat.w{k}(1), dat.w{k}(end)]) title (expname{k}) legend (__labels__ (dat.outname, "y"){:}) + ylabel ("Output Magnitude [dB]") subplot (2, 1, 2) bar (dat.w{k}, 20*log10(abs (dat.u{k}))) xlim ([dat.w{k}(1), dat.w{k}(end)]) legend (__labels__ (dat.inname, "u"){:}) + xlabel ("Frequency") + ylabel ("Input Magnitude [dB]") endfor endif endif ## TODO: think about the 20*log10 and the bars in general - % hold off - endfunction This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |