时域离散信号的产生与基本运算.docx

上传人:b****5 文档编号:5241174 上传时间:2022-12-14 格式:DOCX 页数:13 大小:107.31KB
下载 相关 举报
时域离散信号的产生与基本运算.docx_第1页
第1页 / 共13页
时域离散信号的产生与基本运算.docx_第2页
第2页 / 共13页
时域离散信号的产生与基本运算.docx_第3页
第3页 / 共13页
时域离散信号的产生与基本运算.docx_第4页
第4页 / 共13页
时域离散信号的产生与基本运算.docx_第5页
第5页 / 共13页
点击查看更多>>
下载资源
资源描述

时域离散信号的产生与基本运算.docx

《时域离散信号的产生与基本运算.docx》由会员分享,可在线阅读,更多相关《时域离散信号的产生与基本运算.docx(13页珍藏版)》请在冰豆网上搜索。

时域离散信号的产生与基本运算.docx

时域离散信号的产生与基本运算

实验一时域离散信号的产生与基本运算

1、实验目的

1、了解常用的时域离散信号及其特点。

2、掌握MATLAB产生常用时域离散信号的方法。

3、掌握时域离散信号简单的基本运算方法。

二、实验内容

1、自己设定参数,分别表示并绘制单位抽样序列、单位阶跃序列、正弦序列、

实指数序列、随机序列。

2、自己设定参数,分别表示并绘制信号移位、信号相加、信号相乘、信号翻转、

信号和、信号积、信号能量。

3、已知信号

(1)描绘

序列的波形。

(2)用延迟的单位脉冲序列及其加权和表示

序列。

(3)描绘以下序列的波形:

3、实现步骤

1、自己设定参数,分别表示并绘制单位抽样序列、单位阶跃序列、正弦序列、

实指数序列、随机序列。

(1)单位抽样序列

程序:

x=zeros(1,10);

x

(2)=1;

stem(x,'filled')

axis([0,10,-0.2,1]);

title('µ¥Î»³éÑùÐòÁÐ');

图1

(2)单位阶跃序列

程序:

N=10;

u=ones(1,N);

stem(u,'filled')

axis([-10,10,0,1]);

title('µ¥Î»½×Ô¾ÐòÁÐ');

图2

(3)正弦序列

程序:

x=-20:

1:

20;

y=sin(0.2*pi.*x+0.5*pi);

stem(x,y,'filled');

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

title('ÕýÏÒÐòÁÐ');

图3

(4)实指数序列a=1/2

程序:

n=0:

10;

a1=1/2;

y1=a1.^n;

stem(n,y1,'filled');

axis([0,10,0,1]);

title('ʵָÊýÐòÁУ¬a=1/2');

图4

5实指数序列a=2

程序:

n=0:

10;

a2=2;

y2=a2.^n;

stem(n,y2,'filled');

title('ʵָÊýÐòÁÐ,a=2');

图5

6随机序列

程序:

y=rand(1,20);

stem(y,'filled');

title('Ëæ»úÐòÁÐ');

图6

2、自己设定参数,分别表示并绘制信号移位、信号相加、信号相乘、信号翻转、

信号和、信号积、信号能量。

信号的移位:

(1)信号移位

程序:

n=-3:

10;k0=3;k1=-3;%ʵÏÖÐźŵÄÒÆλ

x=cos(2*pi*n/10);

x1=cos(2*pi*(n-k0)/10);

x2=cos(2*pi*(n-k1)/10);

subplot(3,1,1),stem(n,x,'filled');

ylabel('x(n)');

subplot(3,1,2),stem(n,x1,'filled');

ylabel('x(n-2)');

subplot(3,1,3),stem(n,x2,'filled');

ylabel('x(n+2)');

2信号相加、信号相乘

程序:

n=-3:

20;

x1=cos(2*pi*n/10);

subplot(2,2,1);

stem(n,x1,'filled');title('x

(1)');

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

x2=cos(2*pi*n/10);

subplot(2,2,2);

stem(n,x2,'filled');title('x

(2)');

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

y=x1+x2;

subplot(2,2,3);

stem(n,y,'filled');title('ÐźÅÏà¼Ó');

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

y=x1.*x2;

subplot(2,2,4);

stem(n,y,'filled');title('ÐźÅÏà³Ë');

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

n=-5:

5;

x=exp(-0.4*n);

x1=fliplr(x);

n1=-fliplr(n);

subplot(2,1,1),stem(n,x,'filled');title('x(n)');

subplot(2,1,2),stem(n1,x1,'filled');title('x(-n)');

信号和、信号积、信号能量:

程序:

x=[1,2,3,4,5,6,7,8,9];

y1=sum(x)

y2=prod(x)

E1=sum(x.*conj(x))

得到:

y1=45

y2=362880

E1=285

3、已知信号

(1)描绘

序列的波形;

(2)用延迟的单位脉冲序列及其加权和表示

序列;

(3)描绘一下序列的波形

functionf=u(t)

f=(t>=0);

subplot(2,1,1)

n=-10:

10;

y1=(2*n+5).*(u(n+4)-u(n))+6.*(u(n)-u(n-5));

stem(n,y1,'filled')

axis([-10,10,-3,6]);

title('序列波形');

t=-10:

10;

subplot(2,1,2)

y=(-3)*(u(t+4)-u(t+3))+(-1)*(u(t+3)-u(t+2))+(u(t+2)-u(t+1))+3*(u(t+1)-u(t))+6*(u(t)-u(t-1))+6*(u(t-1)-u(t-2))+6*(u(t-2)-u(t-3))+6*(u(t-3)-u(t-4))+6*(u(t-4)-u(t-5));

stem(t,y,'filled')

axis([-10,10,-3,6]);

title('用单位脉冲序列及其加权和表示序列波形');

subplot(2,2,1)

t=-10:

10;

y=(-3)*(u(t+4)-u(t+3))+(-1)*(u(t+3)-u(t+2))+(u(t+2)-u(t+1))+3*(u(t+1)-u(t))+6*(u(t)-u(t-1))+6*(u(t-1)-u(t-2))+6*(u(t-2)-u(t-3))+6*(u(t-3)-u(t-4))+6*(u(t-4)-u(t-5));

stem(t,y,'filled')

axis([-10,10,-6,12]);

title('x(n)');

subplot(2,2,2)

t=-10:

10;

y=(-3)*(u(t+4)-u(t+3))+(-1)*(u(t+3)-u(t+2))+(u(t+2)-u(t+1))+3*(u(t+1)-u(t))+6*(u(t)-u(t-1))+6*(u(t-1)-u(t-2))+6*(u(t-2)-u(t-3))+6*(u(t-3)-u(t-4))+6*(u(t-4)-u(t-5));

stem(t+2,2*y,'filled')

axis([-10,10,-6,12]);

title('2x(n-2)');

subplot(2,2,3)

t=-10:

10;

y=(-3)*(u(t+4)-u(t+3))+(-1)*(u(t+3)-u(t+2))+(u(t+2)-u(t+1))+3*(u(t+1)-u(t))+6*(u(t)-u(t-1))+6*(u(t-1)-u(t-2))+6*(u(t-2)-u(t-3))+6*(u(t-3)-u(t-4))+6*(u(t-4)-u(t-5));

stem(t-2,2*y,'filled')

axis([-10,10,-6,12]);

title('2x(n+2)');

subplot(2,2,4)

t=-10:

10;

y=(-3)*(u(t+4)-u(t+3))+(-1)*(u(t+3)-u(t+2))+(u(t+2)-u(t+1))+3*(u(t+1)-u(t))+6*(u(t)-u(t-1))+6*(u(t-1)-u(t-2))+6*(u(t-2)-u(t-3))+6*(u(t-3)-u(t-4))+6*(u(t-4)-u(t-5));

stem(2-t,y,'filled')

axis([-10,10,-6,12]);

title('x(2-n)');

4、思考题

当进行离散序列的相乘运算时,例1-6程序中有yp=xa1.*xa2,请问此处进行的相乘运算是矩阵乘还是数组乘,为何这样使用?

答:

此处进行的是数组乘,因为只有用数乘组,才能将序列中对应的数乘起来,实现序列相乘

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

当前位置:首页 > 高等教育 > 艺术

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

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