实验一基本信号产生及信号的基本运算及MATLAB程序

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

实验一 基本信号产生及信号的基本运算

一、实验目的

1.熟悉Matlab 的使用

2.掌握信号处理中基本信号的产生

3.掌握信号处理中信号的基本运算

二、实验内容

1.编程产生以下常用信号并画出波形(n 为信号波形显示区间)

(1) )(0n n +δ 0n =-5;0;5 1010≤≤-n

(2) )(0n n u + 0n =-5;0;5 3010≤≤-n

(3)cos()()8

n u n π

300≤≤n (4)1()()4

n u n 020n ≤≤ 2.编程实现以下基本运算并画出波形

(1)1()()(10)f n u n u n =-- 2020n -≤≤

(2)21()(2)f n f n =-

(3)31()()f n f n =-

(4)已知(){11021}x n =-,,,,, 求10()2R h n =(n),求系统的零状态响应。 三、思考题

1.MATLAB 中几种方式可以计算系统的零状态响应?

四、实验报告要求

1.简述实验目的

2.按实验内容要求编写实验程序,并附上实验结果

3.回答思考题

4.总结实验中的问题

1:

n1=-10:10;

x1=[(n1-0)==-5];x2=[(n1-0)==0];x3=[(n1-5)==5]; subplot(231)

stem(n1,x1,'fill'),grid on

xlabel('T1'),title('x(n)=Delta(n-5)')

subplot(232)

stem(n1,x2,'fill'),grid on

xlabel('T2'),title('x(n)=Delta(n+0)')

subplot(233)

stem(n1,x3,'fill'),grid on

xlabel('T3'),title('x(n)=Delta(n+5)')

n2=-10:30;

u1=[(n2-5)>=0];u2=[(n2-0)>=0];u3=[(n2+5)>=0]; subplot(234)

stem(n2,u1,'fill'),grid on

xlabel('T1'),title('x(n)=u(n-5)')

subplot(235)

stem(n2,u2,'fill'),grid on

xlabel('T2'),title('x(n)=u(n+0)')

subplot(236)

stem(n2,u3,'fill'),grid on

xlabel('T3'),title('x(n)=u(n+5)')

2:

n1=0:30;

x1=cos(pi/8*n1);

subplot(211);

stem(n1,x1,'fill');grid on;

title('x(n)=cos(pi/8*n)u(n)');

n2=0:20;

x2=(1/4).^n2;

subplot(212);

stem(n2,x2,'fill');grid on;

title('x(n)=(0.25^n)u(n)');

3:

n=-20:20;

x1=[(n-0)>=0&(n-10)<=0];

%x1=[(n-0)>=0];x2=[(n-10)>=0];x3=x1-x2;

subplot(311);

stem(n,x1);

title('f1(n)=u(n)-u(n-10)');

subplot(312);

stem(n+2,x1)

title('f2(n)=f1(n-2)');

subplot(313);

stem(-n,x1);

title('f3(n)=f1(-n)');

4:

nx=0:4;

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

h=2*ones(1,10);

nh=0:9;

nys=nx(1)+nh(1);nyf=nx(end)+nh(end); ny=nys:nyf;

y=conv(h,x);

stem(ny,y,'fill');

title('零状态响应');

5:

相关文档
最新文档