数字信号处理Matlab课后实验(吴镇扬).doc数字信号处理实验报告
实验一熟悉MATLAB环境
实验二信号的采样与重建
实验三快速变换及其应用
实验四 IIR数字滤波器的设计
实验五 FIR数字滤波器的设计
实验一熟悉MATLAB环境
一、实验目的
(1)熟悉MATLAB的主要操作命令。
(2)学会简单的矩阵输入和数据读写。
(3)掌握简单的绘图命令。
(4)用MATLAB编程并学会创建函数。
(5)观察离散系统的频率响应。
二、实验内容
认真阅读本章附录,在MATLAB环境下重新做一遍附录中的例子,体会各条命令的含义。在熟悉了MATLAB基本命令的基础上,完成以下实验。
上机实验内容:
(1)数组的加、减、乘、除和乘方运算。输入A=[1 2 3 4],B=[3 4 5 6],求C=A+B,D=A-B,E=A.*B,F=A./B,G=A.^B并用stem语句画出A、B、C、D、E、F、G。
实验程序:
A=[1 2 3 4];
B=[3 4 5 6];
n=1:4;
C=A+B;D=A-B;E=A.*B;F=A./B;G=A.^B;
subplot(4,2,1);stem(n,A,'fill');xlabel ('时间序列n');ylabel('A');
subplot(4,2,2);stem(n,B,'fill');xlabel ('时间序列n');ylabel('B');
subplot(4,2,3);stem(n,C,'fill');xlabel ('时间序列n');ylabel('A+B');
subplot(4,2,4);stem(n,D,'fill');xlabel ('时间序列n');ylabel('A-B');
subplot(4,2,5);stem(n,E,'fill');xlabel ('时间序列n');ylabel('A.*B');
subplot(4,2,6);stem(n,F,'fill');xlabel ('时间序列n');ylabel('A./B');
subplot(4,2,7);stem(n,G,'fill');xlabel ('时间序列n');ylabel('A.^B');
运行结果:
(2)用MATLAB实现以下序列。
a)x(n)= 0≤n≤15
实验程序:
n=0:15;x=.^n;
stem(n,x,'fill'); xlabel ('时间序列n');ylabel('x(n)=^n');
b)x(n)=e(+3j)n 0≤n≤15
实验程序:
n=0:15;x=exp((+3*j)*n);
stem(n,x,'fill'); xlabel ('时间序列n');ylabel('x(n)=exp((+3*j)*n)');
运行结果:
a)的时间序列 b)的时间序列
c)x(n)=3cos(+)+2sin(+) 0≤n≤15
实验程序:
n=0:1:15;
x=3*cos(*pi*n+*pi)+2*sin(*pi*n+*pi);
stem(n,x,'fill'); xlabel('时间序列n');
ylabel('x(n)=3*cos(*pi*n+*pi)+2*sin(*pi*n+*pi)');
运行结果:
d)将c)中的x(n)扩展为以16为周期的函数x16(n)=x(n+16),绘出四个周期
实验程序:
n=0:1:63;
x=3*cos(*pi*rem(n,16)+*pi)+2*sin(*pi*rem(n,16)+*pi);
stem(n,x,'fill'); xlabel ('时间序列n');ylabel('x16(n)');
e)将c)中的x(n)扩展为以10为周期的函数x10(n)=x(n+10),绘出四个周期
实验程序:
n=0:1:39;
x=3*cos(*pi*rem(n,10)+*pi)+2*sin(*pi*rem(n,10)+*pi);
stem(n,x,'fill'); xlabel ('时间序列n');ylabel('x10(n)');
运行结果:
d)的时间序列 e)的时间序列
(3)x(n)=[1,-1,3,5],产生并绘出下列序列的样本。
a)x1(n)=2x(n+2)-x(n-1)-2x(n)
数字信号处理Matlab课后实验(吴镇扬) 来自淘豆网m.daumloan.com转载请标明出处.