⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sinc3.m

📁 这是有关通信中的抽样定理的一些证明,希望能对大家有所启发.
💻 M
字号:
clear
%初始相位为3/pi
fc=100;%sin信号的频率
a=-0.02;
b=0.02;

dt=1/1000;
t=a:dt:b;

fc1=fc*2;%临界采样频率,即每个sin周期取样2个点
ts1=1/fc1;%临界采样的时间间隔
t1=a:ts1:b;
x1=cos(2*pi*fc*t1+3/pi);
y1=0;
for i=1:length(x1)
    y1=y1+x1(i)*sinc((t-t1(i))/ts1);
end

fc2=fc*1.8;%欠采样频率,即每个sin周期取样1.5个点
ts2=1/fc2;%欠采样的时间间隔
t2=a:ts2:b;
x2=cos(2*pi*fc*t2+3/pi);
y2=0;
for i=1:length(x2)
    y2=y2+x2(i)*sinc((t-t2(i))/ts2);
end

fc3=fc*8;%欠采样频率,即每个sin周期取样8个点
ts3=1/fc3;%欠采样的时间间隔
t3=a:ts3:b;
x3=cos(2*pi*fc*t3+3/pi);
y3=0;
for i=1:length(x3)
    y3=y3+x3(i)*sinc((t-t3(i))/ts3);
end

figure
subplot(3,1,1)
plot(t,cos(2*pi*fc*t+3/pi))
subplot(3,1,2)
stem(t1,x1)
subplot(3,1,3)
plot(t,y1)

figure
subplot(3,1,1)
plot(t,cos(2*pi*fc*t+3/pi))
subplot(3,1,2)
stem(t2,x2)
subplot(3,1,3)
plot(t,y2)

figure
subplot(3,1,1)
plot(t,cos(2*pi*fc*t+3/pi))
subplot(3,1,2)
stem(t3,x3)
subplot(3,1,3)
plot(t,y3)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -