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

📄 ch5example7prog1.m

📁 通信程序源代码和模型通信程序源代码和模型通信程序源代码和模型
💻 M
字号:
% ch5example7prog1.m
clear;
Fs=10000;      % 仿真的采样率
t=1/Fs:1/Fs:1; % 仿真时间点
m_t(Fs*1)=0;   % 基带信号变量初始化
for F=150:400  % 基带信号发生:频率150Hz~400Hz
    m_t=m_t+0.003*sin(2*pi*F*t)*(400-F); % 幅度随线性递减
end
m_t90shift=imag(hilbert(m_t)); % 基带信号的希尔伯特变换
carriercos=cos(2*pi*1000*t);   % 1000Hz载波 cos
carriersin=sin(2*pi*1000*t);   % 1000Hz正交载波 sin
s_SSB1=m_t.*carriercos-m_t90shift.*carriersin; % 上边带SSB
s_SSB2=m_t.*carriercos+m_t90shift.*carriersin; % 下边带SSB
% 下面作出各波形以及频谱
figure(1);
subplot(4,2,1); plot(t(1:100),carriercos(1:100),...
t(1:100),carriersin(1:100),'--r'); % 载波
subplot(4,2,2); plot([0:9999],abs(fft(carriercos))); % 载波频谱
axis([0 2000 -500 6000]);
subplot(4,2,3); plot(t(1:100),m_t(1:100));           % 基带信号
subplot(4,2,4); plot([0:9999],abs(fft(m_t)));        % 信号频谱
                axis([0 2000 -500 6000]);
subplot(4,2,5); plot(t(1:100),s_SSB1(1:100));    % SSB波形上边带
subplot(4,2,6); plot([0:9999],abs(fft(s_SSB1))); % SSB频谱上边带
                axis([0 2000 -500 6000]);
subplot(4,2,7); plot(t(1:100),s_SSB2(1:100));    % SSB波形下边带
subplot(4,2,8); plot([0:9999],abs(fft(s_SSB2))); % SSB频谱下边带
axis([0 2000 -500 6000]);

⌨️ 快捷键说明

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