From: <par...@us...> - 2012-09-14 10:07:40
|
Revision: 11009 http://octave.svn.sourceforge.net/octave/?rev=11009&view=rev Author: paramaniac Date: 2012-09-14 10:07:29 +0000 (Fri, 14 Sep 2012) Log Message: ----------- control: finish multiplot nyquist Modified Paths: -------------- trunk/octave-forge/main/control/devel/multiplot.m trunk/octave-forge/main/control/devel/nyquist2.m Modified: trunk/octave-forge/main/control/devel/multiplot.m =================================================================== --- trunk/octave-forge/main/control/devel/multiplot.m 2012-09-14 09:45:19 UTC (rev 11008) +++ trunk/octave-forge/main/control/devel/multiplot.m 2012-09-14 10:07:29 UTC (rev 11009) @@ -17,4 +17,5 @@ figure (5) -nyquist2 (C_AH, "r-", C_opt, "b:") +nyquist2 (C_AH, "xr", C_opt, "ob") +legend ("Test C_AH", "Test C_opt") \ No newline at end of file Modified: trunk/octave-forge/main/control/devel/nyquist2.m =================================================================== --- trunk/octave-forge/main/control/devel/nyquist2.m 2012-09-14 09:45:19 UTC (rev 11008) +++ trunk/octave-forge/main/control/devel/nyquist2.m 2012-09-14 10:07:29 UTC (rev 11009) @@ -64,9 +64,9 @@ if (! nargout) tmp = cellfun (@isa, varargin, {"lti"}); - sys_idx = find (tmp) + sys_idx = find (tmp); tmp = cellfun (@ischar, varargin); - style_idx = find (tmp) + style_idx = find (tmp); len = numel (H); plot_args_pos = {}; @@ -82,12 +82,17 @@ else lim = sys_idx(k+1); endif - style = varargin(style_idx(style_idx > sys_idx(k) & style_idx <= lim)) - plot_args_pos = cat (2, plot_args_pos, re{k}, im{k}, {"-", "color", col}, style); - plot_args_neg = cat (2, plot_args_neg, re{k}, -im{k}, {"-.", "color", col}, style); + style = varargin(style_idx(style_idx > sys_idx(k) & style_idx <= lim)); + if (isempty (style)) + plot_args_pos = cat (2, plot_args_pos, re{k}, im{k}, {"-", "color", col}); + plot_args_neg = cat (2, plot_args_neg, re{k}, -im{k}, {"-.", "color", col}); + else + plot_args_pos = cat (2, plot_args_pos, re{k}, im{k}, style); + plot_args_neg = cat (2, plot_args_neg, re{k}, -im{k}, style); + endif legend_args{k} = inputname(sys_idx(k)); endfor -%plot_args_pos + h = plot (plot_args_pos{:}, plot_args_neg{:}); axis ("tight") xlim (__axis_margin__ (xlim)) @@ -97,7 +102,6 @@ xlabel ("Real Axis") ylabel ("Imaginary Axis") legend (h(1:len), legend_args) - % legend (h(1:2:2*len), legend_args) else re_r = re{1}; im_r = im{1}; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |