Mercurial > hg > octave-terminal
changeset 5605:5b80eaa366c1
[project @ 2006-02-02 16:49:52 by jwe]
author | jwe |
---|---|
date | Thu, 02 Feb 2006 16:49:52 +0000 |
parents | 2857357f9d3c |
children | 70ef31ebe156 |
files | scripts/ChangeLog scripts/control/base/rlocus.m scripts/plot/grid.m |
diffstat | 3 files changed, 18 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,11 @@ +2006-02-02 John W. Eaton <jwe@octave.org> + + * plot/grid.m: Append ";\n" to "set grid" command. + +2006-02-02 A S Hodel <hodelas@auburn.edu> + + * control/base/rlocus.m: Don't atttempt to plot rlzer if it is empty. + 2006-01-13 John W. Eaton <jwe@octave.org> * audio/Makefile.in, control/base/Makefile.in,
--- a/scripts/control/base/rlocus.m +++ b/scripts/control/base/rlocus.m @@ -74,7 +74,7 @@ ## Convert the input to a transfer function if necessary - [num,den] = sys2tf(sys) # extract numerator/denom polyomials + [num,den] = sys2tf(sys); # extract numerator/denom polyomials lnum = length(num); lden = length(den); if(lden < 2) error(sprintf("length of derivative=%d, doesn't make sense",lden)); @@ -217,9 +217,14 @@ inname{1}, outname{1},gvec(1),gvec(ngain))); ylabel("Imag. axis"); - plot(real(rlpolv),imag(rlpolv),".1;locus points;", ... - real(olpol),imag(olpol),"x2;open loop poles;", ... - real(rlzer),imag(rlzer),"o3;zeros;"); + if(isempty(rlzer)) + plot(real(rlpolv),imag(rlpolv),".1;locus points;", ... + real(olpol),imag(olpol),"x2;open loop poles;"); + else + plot(real(rlpolv),imag(rlpolv),".1;locus points;", ... + real(olpol),imag(olpol),"x2;open loop poles;", ... + real(rlzer),imag(rlzer),"o3;zeros;"); + endif rldata = []; endif endfunction