文档介绍:%% MATLAB Program 4-1
num=[1 3]; den=[1 5 20 16 0];
r=rlocus(num,den);
plot(r,'-'); v=[-6 6 -6 6]; axis(v); axis('square');
gtext('o')
gtext('x')
gtext('x')
gtext('x')
gtext('x')
%% MATLAB Program 4-2
num=[1];
den=[1 5 0];
r=rlocus(num,den);
plot(r,'o')
v=[-6 6 -6 6];axis(v)
grid
title('Root-Locus Plot of G(s)=K/[s(s+)(s^2++10)]')
xlabel('Real Axis')
ylabel('Imag Axis')
%% MATLAB Program 4-3
num=[1];
den=[1 5 0];
K1=0::20;
K2=20::30;
K3=30:5:1000;
K=[K1 K2 K3];
r=rlocus(num,den,K);
plot(r,'o')
v=[-4 4 -4 4];axis(v)
grid
title('Root-Locus Plot of G(s)=K/[s(s+)s^2++10)]')
xlabel('Real Axis')
ylabel('Imag Axis')
%% MATLAB Program 4-4
A=[0 1 0;0 0 1;-160 -56 -14];
B=[0;1;-14];
C=[1 0 0];
D=[0];
K=0::400;
r=rlocus(A,B,C,D,K);
plot(r,'-'); v=[-20 20 -20 20]; axis(v)
grid
gtext('o')
gtext('x')
gtext('x')
gtext('x')
%% MATLAB Program 4-5
num=[1];
den=[1 3 2 0];
numa=[1];
dena=[1 3 3 1];
K1=0::;
K2=::;
K3=::10;
K4=10:5:100;
K=[K1 K2 K3 K4];
r=rlocus(num,den,K);
a=rlocus(numa,dena,K);
y=[r a];
plot(y,'-')
v=[-4 4 -4 4];axis(v)
grid
title('Root-locus Plot of G(s)=K/[s(s+1)(s+2)]and Asymptotes')
%% MATLAB Program 4-6
num=[1];
den=[1 3 2 0];
numa=[1];
dena=[1 3 3 1];
K1=0::;
K2=::;
K3=::10;
K4=10:5:100;
K=[K1 K2 K3 K4];
r=rlocus(num,