Mercurial > hg > octave-lyh
changeset 3306:b3bef983b12d
[project @ 1999-10-21 01:48:13 by jwe]
author | jwe |
---|---|
date | Thu, 21 Oct 1999 01:49:16 +0000 |
parents | f1c5658772cf |
children | b6c74a0772b5 |
files | scripts/ChangeLog scripts/control/bode.m |
diffstat | 2 files changed, 16 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,11 @@ +1999-10-20 John W. Eaton <jwe@bevo.che.wisc.edu> + + * control/bode.m: Don't return anything if nargout == 0. + +1999-10-20 James B. Rawlings <jbraw@bevo.che.wisc.edu> + + * control/bode.m: Don't do axis scaling for magnitude plots. + 1999-10-20 John W. Eaton <jwe@bevo.che.wisc.edu> * Makefile.in (DISTFILES): Add move-if-change, mkdoc, and
--- 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