-1.3140 -18.5860i k =
[]
>> [angle,mag]=cart2pol(real(r),imag(r))
angle =
-1.5054 1.5054 1.6462 -1.6462
mag =
1.5180 1.5180 1.3175
1.3175
X(s)=1.5180*exp(j*2.6258)/(s+1.5145-j*21.4145)+1.5180*exp(-j*2.6258)/(s+1.5145+j*21.4145)+ 1.3175*exp(j*1.6462)/(s+1.3140-j*18.5860)+ 1.3175*exp(-j*1.6462)/(s+1.3140+j*18.5860) x(t)=0.1984*exp(-1.5145*t)cos(21.4145t)u(t)-3.0294*exp(-1.5145*t)sin(21.4145t)u(t)-0.1984exp*(-1.3140*t)cos(18.5860*t)u(t)2.6274*exp*(-1.3140*t)sin((18.5860*t)u(t) 1_(3)
>> num=[1 0 0 0];
>> den=conv([1 5],[1 5 25]); >> [r,p,k]=residue(num,den) r =
-2.5000 - 1.4434i -2.5000 + 1.4434i -5.0000 p =
-2.5000 + 4.3301i -2.5000 - 4.3301i -5.0000
k =
1
>> [angle,mag]=cart2pol(real(r),imag(r))
angle =
-2.6180 2.6180 3.1416
mag =
2.8868 2.8868
5.0000
X(s)=1+2.8868*exp(-j*2.6180)/(s+2.5-j* 4.3301)+2.8868*exp(j*2.6180)/(s+2.5+j*4.3301)+5/(s+5) X(t)=δ(t)-5*exp(-2.5*t)cos(4.3301*t)u(t)-2.8868*exp(-2.5*t)sin(4.3301*t)u(t)-5*exp(-5*t)u(t)
M6-2
对微分方程两边进行单边laplace变换,得
整理后,得
所以
零输入响应
MATLAB程序如下 >> num=[1 6]; >> den=[1 4 3];
>> [r,p,s]=residue(num,den) r =
-1.5000
2.5000 p =
-3 -1 s =
[] 由此可得所以
MATLAB 程序如下 >> num=[2 1];
>> den=conv([1 0],[1 4 3]); >> [r,p,k]=residue(num,den) r =
-0.8333 0.5000 0.3333 p =
-3 -1 0
k =
[] 所以
所以
图形输出MATLAB程序如下
>> t=0:0.001:10; >> ut=(t>=0);
>> yzi=(2.5*exp(-t)-1.5*exp(-3*t)).*ut; >> yzs=(0.5*exp(-t)-0.8333*exp(-3*t)).*ut; >> yt=yzi+yzs; >> subplot(2,1,1)
>> plot(t,yzi,'b',t,yzs,'r'); >> subplot(2,1,2) >>
plot(t,yt)
1.510.50-0.50123456789101.510.50012345678910
M6-5
>> num=[1 2]; >> den=[1 2 2 1]; >> sys=tf(num,den); >> figure(1);pzmap(sys); t=0:0.02:10; >> w=0:0.02:5;
>> h=impulse(num,den,t); >> figure(2);plot(t,h); >> xlabel('times(s)');
>> title('Impulse Respone') >> t=0:0.02:10; >> w=0:0.02:5;
>> h=step(num,den,t); >> figure(3);plot(t,h); >> title('阶跃相应') >> H=freqs(num,den,w); >> figure(4);plot(w,abs(H)) >> xlabel('Frequency\\omega'); >> title('Magnitude Respone'); >> plot(w,angle(H))