From: <par...@us...> - 2012-09-14 09:45:26
|
Revision: 11008 http://octave.svn.sourceforge.net/octave/?rev=11008&view=rev Author: paramaniac Date: 2012-09-14 09:45:19 +0000 (Fri, 14 Sep 2012) Log Message: ----------- control: quicksave multiplot nyquist (2) 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 08:57:52 UTC (rev 11007) +++ trunk/octave-forge/main/control/devel/multiplot.m 2012-09-14 09:45:19 UTC (rev 11008) @@ -13,4 +13,8 @@ figure (4) -nyquist2 (C_AH, C_opt) \ No newline at end of file +nyquist2 (C_AH, C_opt) + + +figure (5) +nyquist2 (C_AH, "r-", C_opt, "b:") Modified: trunk/octave-forge/main/control/devel/nyquist2.m =================================================================== --- trunk/octave-forge/main/control/devel/nyquist2.m 2012-09-14 08:57:52 UTC (rev 11007) +++ trunk/octave-forge/main/control/devel/nyquist2.m 2012-09-14 09:45:19 UTC (rev 11008) @@ -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 = {}; @@ -77,11 +77,17 @@ for k = 1:len col = colororder(1+rem (k-1, rc), :); - 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}); + if (k == len) + lim = nargin; + 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); 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)) @@ -98,4 +104,4 @@ w_r = w{1}; endif -endfunction \ No newline at end of file +endfunction This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |