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

📄 tzcx.m

📁 matlab实现调制解调程序
💻 M
字号:
%对信号进行调制,产生已调信号并对其进行频谱分析
Fs=100;                 %采样频率
T=1/Fs;                 %采样周期
Tp=10;                  %观察时间
N=Tp/T;                 %采样点数
n=(0:1:N-1);
t=n*T;
%基带调制信号:cos(pi*t);
%载波信号:cos(15*pi*t)载波信号的幅度2
% Xi为已调信号

%显示基带调制信号
subplot(2,2,1)
plot(t,cos(pi.*t))
title( ' 调制信号 ' )
xlabel( ' 时间:s=10 ' )
ylabel( '幅度=2 ' )
grid

%显示载波信号
subplot(2,2,2)
plot(t,2.*cos(15.*pi.*t))
title( ' 载波信号 ' )
xlabel( ' 时间:s=10 ' )
ylabel( '幅度=4 ' )
grid

%显示已调信号
Xi=2.*cos(pi.*t).*cos(15.*pi*t);           
subplot(2,2,3)
plot(t,Xi)
title( ' 已调信号 ' ) 
xlabel( ' 时间:s=10 ' )
ylabel( '幅度=4' )
grid

%对已调信号采样后做2048点DFT discrete Fourier transform (DFT)
Yk=fft(Xi,2048);
%分析已调信号的频谱
Yw=2*pi/N*abs(fftshift(Yk));
%对应频谱
Fw=[-1024:1023]/2048*Fs;
subplot(2,2,4)
plot(Fw,Yw);
title( '已调信号的频谱 ')
xlabel( '频率:Hz=100' )
ylabel( '幅度=4' )
grid 

⌨️ 快捷键说明

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