CMU
UM


Function sigma
plotting the sigma requirement on the root locus

Below is the function sigma.m. This fuction will plot the sigma requirment on the same graph as another plot, such as an rlocus. To use sigma.m in Matlab enter sigma(sigma). Copy the following text into a file sigma.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[ ] = sigma(sigma)
%SIGMA  Generate s-plane grid lines for a root locus or pole-zero map.
%
%       SIGMA 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
%       similtaneously.  Can also be used by itself.
%
%       See also: RLOCUS, ZGRID, SGRID, JGRID, and PZMAP.

error(nargchk(1,1,nargin));

status = ishold;

hold on

%Plot sigma  line
    limits = axis;
    for i = 1:30*max(limits(:)),
        sl(i) = 1;
    end
    [w,z] = meshgrid(sigma,sl);
    re = -w.*z;
    [mcols, nrows] = size(z);
    im = 0.1:0.1:3*max(limits(:));
    plot(re,im,'w:',re,-im,'w:');
    hold on
	
if (~status), hold off, end

Use your browser's "Back" button to return to the previous page.

8/28/96 JDP