文档详情

第二章实验离散时间系统的时域分析.doc

发布:2016-12-20约1.15万字共25页下载文档
文本预览下载声明
南昌大学实验报告 学生姓名:****** 学 号: 6103413001 专业班级: *********** 实验类型: □ 验证 □ 综合 □ 设计 □ 创新 实验日期: 实验成绩: 第章:离散时间信号的时域分析 1、学会用MATLAB在时域中产生一些基本的离散时间信号,并对这些信号进行一些基本的运算。 2、学会使用基本的MATLAB命令,并将它们应用到简单的数字信号处理问题中。 二、实验要求: 1、学习并调试本章所给的例子。 2、回答书后给出的问题。 3、实验报告仅回答奇数信号的例子。 三、实验程序及结果 Q2.1 对M=2,运行上述程序,生成输入x[n]=s1[n]+s2[n]的输出信号。输入x[n] 的哪个分量被该离散时间系统抑制? Project 2.1 滑动平均系统 % 程序 P2_1 % 一个M点滑动平均滤波器的仿真 % 产生输入信号 n = 0:100; s1 = cos(2*pi*0.05*n); % 一个低频正弦 s2 = cos(2*pi*0.47*n); % 一个高频正弦 x = s1+s2; % M点滑动平均滤波器的实现 M = input(滤波器所需的长度 = ); num = ones(1,M); y = filter(num,1,x)/M; clf; subplot(2,2,1); plot(n, s1); axis([0, 100, -2, 2]); xlabel(时间序号n); ylabel(振幅); title(低频正弦); subplot(2,2,2); plot(n, s2); axis([0, 100, -2, 2]); xlabel(时间序号n); ylabel(振幅); title(高频正弦); subplot(2,2,3); plot(n, x); axis([0, 100, -2, 2]); xlabel(时间序号n); ylabel(振幅); title(输入信号); subplot(2,2,4); plot(n, y); axis([0, 100, -2, 2]); xlabel(时间序号n); ylabel(振幅); title(输出信号); axis; 仿真结果如图所示: 输入部分高频分量被抑制了。 Q2.3对滤波器长度M和正弦信号s1[n]和s2[n]的频率取其他值,运行程序P2.1,算出结果。 n = 0:100; s1=cos(2*pi*0.02*n); s2=cos(2*pi*0.46*n); x = s1+s2; % M点滑动平均滤波器的实现 M = input(滤波器所需的长度 = ); num = ones(1,M); y = filter(num,1,x)/M; clf; figure, subplot(2,2,1); plot(n, s1); axis([0, 100, -2, 2]); xlabel(时间序号n); ylabel(振幅); title(低频正弦); subplot(2,2,2); plot(n, s2); axis([0, 100, -2, 2]); xlabel(时间序号n); ylabel(振幅); title(高频正弦); subplot(2,2,3); plot(n, x); axis([0, 100, -2, 2]); xlabel(时间序号n); ylabel(振幅); title(输入信号); subplot(2,2,4); plot(n, y); axis([0, 100, -2, 2]); xlabel(时间序号n); ylabel(振幅); title(输出信号); axis; num =[1,-ones(1,M-1)]; y = filter(num,1,x)/M; figure, subplot(2,2,1); plot(n, s1); axis([0, 100, -2, 2]); xlabel(时间序号n); ylabel(振幅); title(低频正弦); subplot(2,2,2); plot(n, s2); axis([0, 100, -2, 2]); xlabel(时间序号n); ylabel(振幅); title(高频正弦); subplot(2,2,3); plot(n, x); axis([0, 100, -2, 2]); xlabel(时间序号n); ylabel(振幅); title(输入信号); subplot(2,2,4); plot(n, y); axis([0, 100, -2, 2]); xlabel(时间序号n); ylabel(振幅); t
显示全部
相似文档