% ***** MATLAB Code Starts Here %
%ROOT_LOCUS_01_MAT
%
fig_size = [232 84 774 624];
olz = [-1; 1+j; 1-j];
% open-loop poles and zerosolp = [0; -0.5; -2; -2; -1+j; -1-j];
%
num = real(poly(olz));
% open-loop transfer functionden = real(poly(olp));
%
figure(1),clf,root_locus(num,den);
title(
'K > 0'),set(gcf,'Position',fig_size)%
figure(2),clf,root_locus(-num,den);
title(
'K < 0'),set(gcf,'Position',fig_size)
% % ***** MATLAB Code Stops Here
Click the
icon to return to the Dr. Beale's home page