From: <par...@us...> - 2012-09-23 08:38:20
|
Revision: 11087 http://octave.svn.sourceforge.net/octave/?rev=11087&view=rev Author: paramaniac Date: 2012-09-23 08:38:14 +0000 (Sun, 23 Sep 2012) Log Message: ----------- control: style fix in time response code Modified Paths: -------------- trunk/octave-forge/main/control/devel/multiplot2.m trunk/octave-forge/main/control/inst/__time_response__.m Modified: trunk/octave-forge/main/control/devel/multiplot2.m =================================================================== --- trunk/octave-forge/main/control/devel/multiplot2.m 2012-09-22 22:03:02 UTC (rev 11086) +++ trunk/octave-forge/main/control/devel/multiplot2.m 2012-09-23 08:38:14 UTC (rev 11087) @@ -94,7 +94,7 @@ % Step Response of Closed Loop figure (2) -step2 (T, Tr4, Tr2) +step (T, Tr4, Tr2) %{ % Step Response of Closed Loop Modified: trunk/octave-forge/main/control/inst/__time_response__.m =================================================================== --- trunk/octave-forge/main/control/inst/__time_response__.m 2012-09-22 22:03:02 UTC (rev 11086) +++ trunk/octave-forge/main/control/inst/__time_response__.m 2012-09-23 08:38:14 UTC (rev 11087) @@ -166,16 +166,15 @@ color = colororder(1+rem (k-1, rc), :); style = {"color", color}; endif - discrete = ! ct_idx(k); - if (discrete) # discrete-time system + if (ct_idx(k)) # continuous-time system for i = 1 : p # for every output for j = 1 : cols # for every input (except for initial where cols=1) subplot (p, cols, (i-1)*cols+j); - stairs (t{k}, y{k}(:, i, j), style{:}); + plot (t{k}, y{k}(:, i, j), style{:}); hold on; grid on; if (k == n_sys) - axis tight; + axis tight ylim (__axis_margin__ (ylim)) if (j == 1) ylabel (outname{i}); @@ -186,20 +185,15 @@ endif endfor endfor - else # continuous-time system + else # discrete-time system for i = 1 : p # for every output for j = 1 : cols # for every input (except for initial where cols=1) subplot (p, cols, (i-1)*cols+j); - ##if (n_sys == 1 && isstable (sys_cell{1})) - ## plot (t{k}, y{k}(:, i, j), style{:}, [t{k}(1), t{k}(end)], repmat (yfinal(i,j), 1, 2)); - ## ## TODO: plot final value first such that its line doesn't overprint the response - ##else - plot (t{k}, y{k}(:, i, j), style{:}); - ##endif + stairs (t{k}, y{k}(:, i, j), style{:}); hold on; grid on; if (k == n_sys) - axis tight + axis tight; ylim (__axis_margin__ (ylim)) if (j == 1) ylabel (outname{i}); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |