离散信号的产生及运算

  • 格式:doc
  • 大小:199.55 KB
  • 文档页数:5

下载文档原格式

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

实验离散信号的产生及运算实验报告一实验任务

二实验程序及结果

n=0 :20;

x=3*sin(pi*n/4+4/pi);

subplot(2, 2, 1), stem(n,x);

title(' x=3*sin(pi*n/4+4/pi)');

n=-20*pi:20*pi;

f=sinc(n/pi);

subplot(2,2,2), stem(n,f);

title(' f=sinc(n/pi)');

n1 = -5; n2 = 5; n0= 0;

n = n1:n2;

x =[n>=n0];

n1 = -5; n2 = 5; n0= 0;

n = n1:n2;

f =[ n >= n0];

subplot(2,2,3), stem(n, f,'filled'); title('f(n)=u(n)');

n1 = -5; n2 = 5; n01 = -3; n02 = 4;

n = n1:n2;

x1 = [(n-n01) == 0];

x2 = [(n-n02) == 0];

x=x1+2*x2;

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

ylabel('n+3')

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

ylabel('n-4')

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

ylabel('x(n)');

n=0:24;

x1=exp(-n/16);

x2=5*sin(2*pi*n/10);

x=x1.*x2;

subplot(3,1,1);stem(n,x1,'filled','k'); title('x1=exp(-n/16)');

subplot(3,1,2);stem(n,x2,'filled','k'); title(' x2=5*sin(2*pi*n/10)');

subplot(3,1,3);stem(n,x,'filled','k'); title('x(n)=x1*x2');

n=0:20;

x=n.*sin(n);

subplot(3,2,1),stem(n,x,'filled','k'); title('原函数:x(n)=nsin(n)');

y1=(n-3).*sin(n-3);

subplot(3,2,2),stem(n,y1,'filled','k'); title('序列移位:y1=x(n-3)');

y2= fliplr(x);

n1 = -fliplr(n);

subplot(3,2,3),stem(n1,y2,'filled','k'); title('序列反折:y2=x(-n)');

y3=-x;

subplot(3,2,4),stem(n,y3,'filled','k'); title('序列倒相:y3=-x(n)');

y4=fliplr(y1);

n2=-fliplr(n);

subplot(3,2,5),stem(n2,y4,'filled','k'); title('序列移位+反折:y4=x(-n+3)');

y5=(n/2).*sin(n/2);

subplot(3,2,6),stem(n,y5,'filled','k'); title('序列的尺度变换:y5=x(n/2)');

三实验过程中出现的问题及解决方法

1、安装的MATLAB是2013英文版,用起来很不顺利,查了部分单词,多加联系掌握基本用法即可。

2、方程式中遗漏‘.’,出错。仔细检查,改正方程式。

四实验总结

1、一个点可能就是程序成败的关键,认真仔细,细节决定成败。

2、尽可能是图形看起来有对比性、简洁。既能让做的人思考,又能让看的人易发现规律性。