% Script e13 Root locus for a system with real and complex poles
clear % removes all variables from the workspace
den = conv([1 2 0],[1 8 32])  % denominator coefficients (4 poles)
G = tf([1 8],den)
pause
disp('zero, poles, and gain of G(s)')
Gzp = zpk(G)
pause
rlocus(G) % compute root locus
axis('equal')		% same scaling for both axes
axis([-15 5 -10 10]); % adjust plotting area	
grid;title('Root Locus plotted for -15 < real < 5 & equal scaling')
[kk,clroots] = rlocfind(G) % calculate gain values and poles