Mercurial > hg > octave-jordi
comparison scripts/control/rlocus.m @ 3228:dbcc24961c44
[project @ 1998-12-09 18:42:12 by jwe]
author | jwe |
---|---|
date | Wed, 09 Dec 1998 18:42:13 +0000 |
parents | ba1c7cdc6090 |
children | 28aba52a2368 |
comparison
equal
deleted
inserted
replaced
3227:e090571062ee | 3228:dbcc24961c44 |
---|---|
40 | 40 |
41 # Convert the input to a transfer function if necessary | 41 # Convert the input to a transfer function if necessary |
42 # Written by Clem and Tenison | 42 # Written by Clem and Tenison |
43 # Updated by Kristi McGowan July 1996 for intelligent gain selection | 43 # Updated by Kristi McGowan July 1996 for intelligent gain selection |
44 # Updated by John Ingram July 1996 for systems | 44 # Updated by John Ingram July 1996 for systems |
45 # $Revision: 1.7 $ | 45 # $Revision: 2.0.0.0 $ |
46 | 46 |
47 if (nargin < 1) | (nargin > 4) | 47 if (nargin < 1) | (nargin > 4) |
48 usage("rlocus(sys[,inc,mink,maxk])"); | 48 usage("rlocus(sys[,inc,mink,maxk])"); |
49 endif | 49 endif |
50 | 50 |
186 grid("on"); | 186 grid("on"); |
187 rldata = [real(rlpolv), imag(rlpolv) ]; | 187 rldata = [real(rlpolv), imag(rlpolv) ]; |
188 axis(axlim); | 188 axis(axlim); |
189 [stn,inname,outname] = sysgetsignals(sys); | 189 [stn,inname,outname] = sysgetsignals(sys); |
190 xlabel(sprintf("Root locus from %s to %s, gain=[%f,%f]: Real axis", ... | 190 xlabel(sprintf("Root locus from %s to %s, gain=[%f,%f]: Real axis", ... |
191 dezero(inname),dezero(outname),gvec(1),gvec(ngain))); | 191 nth(inname,1),nth(outname,1),gvec(1),gvec(ngain))); |
192 ylabel("Imag. axis"); | 192 ylabel("Imag. axis"); |
193 | 193 |
194 plot(real(rlpolv),imag(rlpolv),".1;locus points;", ... | 194 plot(real(rlpolv),imag(rlpolv),".1;locus points;", ... |
195 real(olpol),imag(olpol),"x2;open loop poles;", ... | 195 real(olpol),imag(olpol),"x2;open loop poles;", ... |
196 real(rlzer),imag(rlzer),"o3;zeros;"); | 196 real(rlzer),imag(rlzer),"o3;zeros;"); |