Below is the function sigrid.m. This function will plot the sigma requirement on the same graph as another plot, such as an rlocus. To use sigrid.m in Matlab enter sigrid(sigma). Copy the following text into a file sigrid.m, and put it in the same directory as the Matlab software, or in a directory which is contained in Matlab's search path.
function[ ] = sigrid(sig) %SIGRID Generate s-plane grid lines for a root locus or pole-zero map. % % SIGRID generates a grid over an existing continuous s-plane root % locus or pole-zero map. Lines of constant sigma are drawn in. % To be used with SGRID if sigma, zeta, and Wn requirements are required % simultaneously. Can also be used by itself. % % See also: RLOCUS, ZGRID, SGRID, JGRID, and PZMAP. error(nargchk(1,1,nargin)); hold on %Plot sigma line limits = axis; mx=limits(1,4); mn=limits(1,3); stz=abs(mx)+abs(mn); st=stz/50; im=mn:st:mx; lim=length(im); for i=1:lim re(i)=-sig; end re(:); plot(re,im,'.') hold off return
Use your browser's "Back" button to return to the previous page.
8/13/97 CJC