北京交通大学《信号与系统》 课后matlab作业.docx

上传人:b****6 文档编号:5823221 上传时间:2023-01-01 格式:DOCX 页数:17 大小:494.10KB
下载 相关 举报
北京交通大学《信号与系统》 课后matlab作业.docx_第1页
第1页 / 共17页
北京交通大学《信号与系统》 课后matlab作业.docx_第2页
第2页 / 共17页
北京交通大学《信号与系统》 课后matlab作业.docx_第3页
第3页 / 共17页
北京交通大学《信号与系统》 课后matlab作业.docx_第4页
第4页 / 共17页
北京交通大学《信号与系统》 课后matlab作业.docx_第5页
第5页 / 共17页
点击查看更多>>
下载资源
资源描述

北京交通大学《信号与系统》 课后matlab作业.docx

《北京交通大学《信号与系统》 课后matlab作业.docx》由会员分享,可在线阅读,更多相关《北京交通大学《信号与系统》 课后matlab作业.docx(17页珍藏版)》请在冰豆网上搜索。

北京交通大学《信号与系统》 课后matlab作业.docx

北京交通大学《信号与系统》课后matlab作业

Matlab课后作业

1.M2-1

(1)Matlab程序:

t=-5:

0.01:

5;

x=(t>0)-(t>2);

plot(t,x);

axis([-5,5,-2,2]);

仿真结果:

(8)Matlab程序:

t=-10:

0.01:

10;

pi=3.14;

x=sin(pi*t)./(pi*t).*cos(30*t);

plot(t,x);

仿真结果:

M2-2

Matlab程序:

t=-2:

0.001:

2;

x=(t>-1)-(t>0)+2*tripuls(t-0.5,1,0);

plot(t,x);

axis([-2,2,-2,2]);

仿真结果:

M3-3

(1)functionyt=f(t)

yt=t.*(t>0)-t.*(t>=2)+2*(t>=2)-3*(t>3)+(t>5);

(2)Matlab程序:

t=-10:

0.01:

11;

subplot(3,1,1);

plot(t,f(t));

title('x(t)');

axis([-1,6,-2,3]);

subplot(3,1,2);

plot(t,f(0.5*t));

axis([-1,11,-2,3]);

title('x(0.5t)');

subplot(3,1,3);

plot(t,f(2-0.5*t));

title('x(2-0.5t)');

axis([-9,5,-2,3]);

仿真结果:

M2-9

(1)Matlab程序:

k=-4:

7;

x=[-3,-2,3,1,-2,-3,-4,2,-1,4,1,-1];

stem(k,x);

仿真结果:

(2)Matlab程序:

k=-12:

21;

x=[-3,-2,3,1,-2,-3,-4,2,-1,4,1,-1];

N=length(x);

y=zeros(1,3*N-2);

y(1:

3:

end)=x;

stem(k,y);

仿真结果:

Matlab程序:

k=-1:

3;

x=[0,0,-3,-2,3,1,-2,-3,-4,2,-1,4,1,-1];

x1=x(1:

3:

end);

stem(k-1,x1);

仿真结果:

(3)Matlab程序:

k=-6:

5;

x=[-3,-2,3,1,-2,-3,-4,2,-1,4,1,-1];

stem(k,x);

仿真结果:

程序

>>k=-2:

9;

>>x=[-3,-2,3,1,-2,-3,-4,2,-1,4,1,-1];

>>stem(k,x);

结果

程序

>>k=-4:

7;

>>x=[-3,-2,3,1,-2,-3,-4,2,-1,4,1,-1];

>>xk=fliplr(x);

>>k1=-fliplr(k);

>>stem(k1,xk);

结果

M3-1

(1)程序

>>ts=0;te=5;dt=0.01;

>>sys=tf([21],[132]);

>>t=ts:

dt:

te;

>>x=exp(-3*t).*(t>=0);

>>y=lsim(sys,x,t);

>>plot(t,y);

>>xlabel('Time(sec)')

>>ylabel('y(t)')

结果

(2)程序

>>ts=0;te=5;dt=0.0001;

>>sys=tf([21],[132]);

>>t=sys:

dt:

te;

>>x=exp(-3*t).*(t>=0);

>>y=lsim(sys,x,t);

>>plot(t,y);

>>xlabel('Time(sec)')

>>ylabel('y(t)')

结果

M3-4

>>x=[0.85,0.53,0.21,0.67,0.84,0.12];

>>k1=-2:

3;

>>h=[0.68,0.37,0.83,0.52,0.71];

>>k2=-1:

3;

>>y=conv(x,h);

>>k=(k1

(1)+k2

(1)):

(k1(end)+k2(end));

>>stem(k,y)

结果

M6-1

(1)>>num=[1600];

>>den=[15.65698162262.7160000];

>>[r,p,k]=residue(num,den)

得r=

0.0992-1.5147i

0.0992+1.5147i

-0.0992+1.3137i

-0.0992-1.3137i

 

p=

-1.5145+21.4145i

-1.5145-21.4145i

-1.3140+18.5860i

-1.3140-18.5860i

 

k=

[]

所以可得

X(s)=

x(t)=3.0108e-1.5145tcos(21.4145t-1.5054)u(t)+2.635e-1.314tcos(18.586t+1.6462)u(t)

(2)X(s)=

解:

>>num=[1000];

den=conv([15],[1525]);

[r,p,k]=residue(num,den)

[angle,mag]=cart2pol(real(r),imag(r))

得r=

-5.0000+0.0000i

-2.5000-1.4434i

-2.5000+1.4434i

 

p=

-5.0000+0.0000i

-2.5000+4.3301i

-2.5000-4.3301i

 

k=

1

angle=

3.1416

-2.6180

2.6180

 

mag=

5.0000

2.8868

2.8868

所以X(s)=

x(t)=δ(t)+5e-5tu(t)+5.7736e-2.5tcos(4.3301t-2.618)u(t)

M6-2

程序

>>t=0:

0.1:

10;

>>y1=(2.5*exp(-t)-1.5*exp(-3*t)).*(t>=0);

>>y2=((1/3)+2*exp(-t)-(5/6)*exp(-3*t)).*(t>=0);

>>y=((1/3)+(9/2)*exp(-t)-(7/3)*exp(-3*t)).*(t>=0);

>>plot(t,y1,'r-',t,y2,'g--',t,y,'b-')

>>xlabel('Time');

>>legend('零输入响应','零状态响应','完全响应')

结果

M6-5

>>num=[12];

>>den=[1221];

>>sys=tf(num,den);

>>pzmap(sys)

>>num=[12];

den=[1221];

[r,p,k]=residue(num,den)

[angle,mag]=cart2pol(real(r),imag(r))

r=

1.0000+0.0000i

-0.5000-0.8660i

-0.5000+0.8660i

 

p=

-1.0000+0.0000i

-0.5000+0.8660i

-0.5000-0.8660i

k=

[]

angle=

0

-2.0944

2.0944

 

mag=

1.0000

1.0000

1.0000

所以H(s)=

系统冲激响应h(t)=e-tu(t)+2e-0.5tcos(0.866t-2.0944)u(t)

>>num=[12];

>>den=conv([10],[1221]);

>>[r,p,k]=residue(num,den)

r=

-1.0000+0.0000i

-0.5000+0.8660i

-0.5000-0.8660i

2.0000+0.0000i

 

p=

-1.0000+0.0000i

-0.5000+0.8660i

-0.5000-0.8660i

0.0000+0.0000i

 

k=

[]

[angle,mag]=cart2pol(real(r),imag(r))

angle=

3.1416

2.0944

-2.0944

0

 

mag=

1.0000

1.0000

1.0000

2.0000

所以Y(s)=

系统阶跃响应y(t)=e-tu(t)+2e-0.5tcos(0.866t+2.0944)u(t)

因为系统的冲激响应

h(t)=e-tu(t)-1.00001e-0.5tcos(0.866t)u(t)+1.73205e-0.5tsin(0.866t)u(t)

所以系统的频率响应

H(jω)=

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 经管营销

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1