信号与系统实验报告实验11.docx
《信号与系统实验报告实验11.docx》由会员分享,可在线阅读,更多相关《信号与系统实验报告实验11.docx(10页珍藏版)》请在冰豆网上搜索。
![信号与系统实验报告实验11.docx](https://file1.bdocx.com/fileroot1/2022-12/16/0b266eac-5a42-4af9-a98d-1f4b6adb0fb1/0b266eac-5a42-4af9-a98d-1f4b6adb0fb11.gif)
信号与系统实验报告实验11
长江大学电工电子实验中心
电路与系统
(2)实验报告
姓名班级序号指导教师成绩
实验名称:
非周期信号的频谱
一、实验目的
1.掌握用matlab绘制离散信号波形图的方法,学会常见波形的绘制。
2.掌握用matlab观测离散信号的周期性的方法。
3.掌握离散信号能量的计算方法。
二、实验内容
实验11-1的程序r11-1.m
n=-5:
15;
f1=(1-0.8.^(n-3)).*u(n-3);
figure
(1),mystem(n,f1)
n=-20:
5;
f2=(0.9.^(-n).*cos(n.*pi/8)).*u(-n+3);
figure
(2),mystem(n,f2);
n=-12:
12;
f3=0.5*n.*rectpuls(n,16);
figure(3),mystem(n,f3);
n=-18:
18;
f4=sawtooth(2*n.*pi/14);
figure(4),mystem(n,f4);
%实验11-2的程序r11-2.m
clear
k0=-7;k1=7;
k=k0:
k1;
f=fd2(k+2);
subplot(1,4,1),mystem(k,f),
title('f(k+2)')
f=fd2(k+2).*u(-k-2);
subplot(1,4,2),mystem(k,f),
title('f(k+2)*u(-k+2)')
f=fd2(-k+2);
subplot(1,4,3),mystem(k,f),
title('f(-k+2)')
f=fd2(-k+2).*u(k-1);
subplot(1,4,4),mystem(k,f),
title('f(-k+2)*u(k-1)')
functionf=fd2(k)
f=delta(k+2)+delta(k+1)-1/3*(k-3).*(u(k)-u(k-3));
%实验11-3的程序r11-3.m
figure
(1)
k=-25:
25;
f=sin(k*pi/4)-2*cos(k*pi/6);
mystem(k,f)
[x,y]=ginput
(2)
gtext(['\bf周期:
N=',num2str(round(x
(2)-x
(1)))])
figure
(2)
k=-25:
25;
f=cos(3*k/7-pi/8);
mystem(k,f)
%实验11-4的程序r11-4.m
clear
figure
(1)
k=-6:
6;
f1=[0000006422000];
mystem(k,f1)
figure
(2)
f2=[0000-3-2-1010000];
mystem(k,f2)
figure(3)
k=-15:
15;
f3=cos(pi*k/2);
mystem(k,f3);
figure(4)
k=-2:
15;
f4=8*(0.5).^k.*u(k);
mystem(k,f4)
disp('离散信号的功率和能量’)
E1=sum(abs(f1).^2)
E2=sum(abs(f2).^2)
k=0:
3;f3=cos(pi*k/2);
E3=sum(abs(f3).^2);P3=E3/4
E4=sum(abs(f4).^2)
离散信号的功率和能量
E1=
60
E2=
15
P3=
0.5000
E4=
85.3333
三、上机实验的收获与体会
通过进行matlab上机实验,学会了用matlab绘制离散信号波形图的方法,学会常见波形的绘制
为进一步学习信号与系统分析打下了良好的基础。