1、3.1正弦信号混叠
A.程序
f=300;
b=0;
fs=8000;
N=80;
t=(0:N-1)/fs;
y=sin(2*pi*f*t+b);
stem(t,y);
B.程序
f=300;
b=0;
fs=8000;
N=80;
t=(0:N-1)/fs;
y=sin(2*pi*f*t+b);
plot(t,y);
C.程序
fa=100;
fb=225;
fc=350;
fd=475;
b=0;
fs=8000;
N=80;
t=(0:N-1)/fs;
y1=sin(2*pi*fa*t+b);
y2=s
2、in(2*pi*fb*t+b);
y3=sin(2*pi*fc*t+b);
y4=sin(2*pi*fd*t+b);
subplot(221),stem(t,y1);
subplot(222),stem(t,y2);
subplot(223),stem(t,y3);
subplot(224),stem(t,y4);
D.程序
fa=7525;
fb=7650;
fc=7750;
fd=7900;
b=0;
fs=8000;
N=80;
t=(0:N-1)/fs;
y1=sin(2*pi*fa*t+b);
y2=sin(
3、2*pi*fb*t+b);
y3=sin(2*pi*fc*t+b);
y4=sin(2*pi*fd*t+b);
subplot(221),stem(t,y1);
subplot(222),stem(t,y2);
subplot(223),stem(t,y3);
subplot(224),stem(t,y4);
E. 程序
fa=32100;
fb=32225;
fc=32350;
fd=32475;
b=0;
fs=8000;
N=80;
t=(0:N-1)/fs;
y1=sin(2*pi*fa*t+b);
y2=si
4、n(2*pi*fb*t+b);
y3=sin(2*pi*fc*t+b);
y4=sin(2*pi*fd*t+b);
subplot(221),stem(t,y1);
subplot(222),stem(t,y2);
subplot(223),stem(t,y3);
subplot(224),stem(t,y4);
fmagplot函数m文件:
function fmagplot(xa,dt)
L=length(xa);
Nfft=round(2.^round(log2(5*L)));
Xa=fft(xa,Nfft);
range=0:(Nf
5、ft/4);
ff=range/Nfft/dt;
plot(ff/1000,abs(Xa(1:length(range))))
title('CONT-TIME FOURIER TRANSFORM(MAG)')
xlabel('FREQUENCY(kHz)'),grid
pause
3.3产生信号
A.程序
n=0:1000;
b=0;
f0=1000;
fsim=80000;
t=n./fsim;
x=cos(2*pi*f0*n/fsim+b);
subplot(211),stem(n,x);
title('SAMPLES'),ylabel('x(t)'),xl
6、abel('n');
subplot(212),plot(t,x);
title('CONTINIOUS'),ylabel('x(t)'),xlabel('t')
B.程序
f=300;
b=0;
fs=80000;
N=1000;
t=(0:N-1)/fs;
y=cos(2*pi*f*t+b);
plot(t,y)
C.程序
f=300;
b=0;
fs=80000;
N=1000;
t=(0:N-1)/fs;
dt=0.0000125
y=cos(2*pi*f*t+b);
fmagplot(y,dt)
3.4。A/D转换
A
7、程序
fs=80000;
fs=8000;
k=fsim/fs;
n=0:1000;
l=length(n);
x=cos(2*pi*1000*n/fs);
y=x(1:k:l);
L=length(y);
n1=0:L-1;
stem(n1,y)
title('AD'),ylabel('x[n]'),xlabel('n')
B.程序
[H,W]=dtft(y,1000);
plot(W,abs(H));
title('DTFT AD'),ylabel('X(jw)'),xlabel('w')
1实验分析:当正弦波的频率逐渐接近采样频率的整倍数时,其绘制出的波形频率逐渐减小,反之则增大.
2实验分析:本实验仿真了正弦信号的抽样并绘制及其信号的傅里叶变换图形的绘制
3
实验分析:连续时间信号x(t)以及对应的连续傅里叶变换都是连续函数。由于数字系统只能处理有限长的离散信号,因此必须将x和都离散化,并且建立对应的傅里叶变换。
DTFT就是x(t)在时域采样后的连续傅里叶变换,也就是离散时间傅里叶变换,它在频域依然是连续的。