# HG changeset patch # User jwe # Date 940470556 0 # Node ID b3bef983b12dfe26a607446806193721734c9a67 # Parent f1c5658772cfd65b880a1a9e232242f2b5556cab [project @ 1999-10-21 01:48:13 by jwe] diff --git a/scripts/ChangeLog b/scripts/ChangeLog --- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,11 @@ +1999-10-20 John W. Eaton + + * control/bode.m: Don't return anything if nargout == 0. + +1999-10-20 James B. Rawlings + + * control/bode.m: Don't do axis scaling for magnitude plots. + 1999-10-20 John W. Eaton * Makefile.in (DISTFILES): Add move-if-change, mkdoc, and diff --git a/scripts/control/bode.m b/scripts/control/bode.m --- a/scripts/control/bode.m +++ b/scripts/control/bode.m @@ -16,7 +16,7 @@ # along with Octave; see the file COPYING. If not, write to the Free # Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. -function [mag,phase,w] = bode(sys,w,outputs,inputs,plot_style) +function [mag_r,phase_r,w_r] = bode(sys,w,outputs,inputs,plot_style) # [mag,phase,w] = bode(sys[,w,outputs,inputs,plot_style]) # Produce Bode plots of a system # @@ -131,14 +131,14 @@ if(do_db_plot && max(mag) > 0) ylabel("Gain in dB"); md = 20*log10(mag); + axvec = axis2dlim([vec(w),vec(md)]); + axvec(1:2) = wv; + axis(axvec); else ylabel("Gain |Y/U|") md = mag; endif - axvec = axis2dlim([vec(w),vec(md)]); - axvec(1:2) = wv; - axis(axvec); grid("on"); if (do_db_plot) semilogx(w,md); @@ -165,6 +165,9 @@ oneplot(); endif endif - mag = phase = w = []; + else + mag_r = mag; + phase_r = phase; + w_r = w; endif endfunction