数字信号处理实验一.docx
《数字信号处理实验一.docx》由会员分享,可在线阅读,更多相关《数字信号处理实验一.docx(13页珍藏版)》请在冰豆网上搜索。
![数字信号处理实验一.docx](https://file1.bdocx.com/fileroot1/2023-1/8/4d4d4ad6-2779-47a7-92e6-9fe6da142d0a/4d4d4ad6-2779-47a7-92e6-9fe6da142d0a1.gif)
数字信号处理实验一
实验一
Q1.3
clf;
n=-10:
20;
u=[zeros(1,11)1zeros(1,19)];
stem(n,u);
xlabel('时间序号n');
ylabel('振幅');
title('单位样本序列
');
axis([-102001.2]);
Q1.4
clf;
n=-10:
20;
u=[ones(1,31)];
stem(n,u);
xlabel('时间序号n');
ylabel('振幅');
title('单位步长序列');
axis([-102001.2]);
Q1.6
clf;
c=-(1/12)+(pi/6)*i;
K=2;
n=0:
40;
x=K*exp(c*n);
subplot(2,1,1);
stem(n,real(x));
xlabel('时间序号n');ylabel('振幅');
title('实部');
subplot(2,1,2);
stem(n,imag(x));
xlabel('时间序号n');ylabel('振幅');
title('虚部');
Q1.8
clf;
c=(1/12)+(pi/6)*i;
K=2;
n=0:
40;
x=K*exp(c*n);
subplot(2,1,1);
stem(n,real(x));
xlabel('时间序号n');ylabel('振幅');
title('实部');
subplot(2,1,2);
stem(n,imag(x));
xlabel('时间序号n');ylabel('振幅');
title('虚部');
Q1.11
clf;
n=0:
35;a=1.2;K=0.2;
x=K*a.^n;
stem(n,x);
xlabel('时间序号');ylabel('振幅');
Q1.14
clf;
n=0:
35;a=0.9;K=20;
x=K*a.^n;
stem(n,x);
xlabel('ʱ¼äÐòÁÐ');ylabel('Õñ·ù');
Q1_22
n=0:
40;
f=0.1;
phase=0;
A=1.5;
arg=2*pi*f*n-phase;
x=A*cos(arg);
clf;
stem(n,x);
axis([040-22]);
grid;
title('正弦序列');
xlabel('时间序号n');
ylabel('振幅');
axis;
Q1.23
n=0:
50;
f=0.08;
phase=0;
A=2.5;
arg=2*pi*f*n-phase;
x=A*cos(arg);
clf;
stem(n,x);
axis([050-33]);
grid;
title('正弦序列');
xlabel('时间序号n');
ylabel('振幅');
axis;
周期是12.5
Q1.26
Q1.27
Q1.28
Q1.29
clf;
R=51;
d=0.8*(rand(R,1)-0.5);
m=0:
R-1;
s=2*m.*(0.9.^m);
x=s+d';
subplot(2,1,1);
plot(m,d','r-',m,s,'g--',m,x,'b-.');
xlabel('时间序号n');ylabel('振幅');
legend('d[n]','s[n]','x[n]');
x1=[00x];x2=[0x0];x3=[x00];
y=(x1+x2+x3)/3;
subplot(2,1,2);
plot(m,y(2:
R+1),'r-',m,s,'g--');
legend('y[n]','s[n]');
xlabel('时间序号m');ylabel('振幅');
Q1.32
信号x1,x2,x3的关系是
Q1.34
clf;
n=0:
100;
m=0.4;fH=0.1;fL=0.01;
xH=sin(2*pi*fH*n);
xL=sin(2*pi*fL*n);
y=(1+m*xL).*xH;
stem(n,y);grid;
xlabel('时间序号n');ylabel('振幅');
clf;
n=0:
100;
m=1;fH=0.5;fL=0.05;
xH=sin(2*pi*fH*n);
xL=sin(2*pi*fL*n);
y=(1+m*xL).*xH;
stem(n,y);grid;
xlabel('时间序号n');ylabel('振幅');
clf;
n=0:
100;
m=0.5;fH=0.8;fL=0.1;
xH=sin(2*pi*fH*n);
xL=sin(2*pi*fL*n);
y=(1+m*xL).*xH;
stem(n,y);grid;
xlabel('时间序号n');ylabel('振幅');