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

📄 pr3_34.m

📁 关于扩频通信的一些基本模块
💻 M
字号:
%Problem 3.34;
%Illustrates principle of frequency diversity;

clear all; close all;
t=[1:3000]/1000; %time scale;
f0=[25.1,35.12]; %carrier frequency;
S=ones(2,1)*exp(-16*(t-1.5).^2); Sbp=real(S.*exp(i*2*pi*f0'*t)); %signal envelope and bandpass signals of two frequencies;
TP=(unidrnd(100,1,10)-1)/100; %tau profile the same for both branches: diversity is done by transmitting at two carriers;
for k=1:2 %in the loop resulting signals are calculated at the outputs of two frequency diversity branches;
    YL=num2str(k);
    YL1=['sent sig freq ',YL];
    subplot(3,2,k); plot(t,Sbp(k,:)); ylim([-1.2 1.2]); xlabel('t/T'); ylabel(YL1); grid; %plotting sent signal of k-th carrier;
    AR=abs(sum(exp(i*2*pi*f0(k)*TP)));  %k-th resulting real amplitude;
    Sbpres=AR*Sbp(k,:); %resulting signal of k-th diversity branch;
    YL2=['rec sig freq ',YL];
    subplot(3,2,k+2); stem(TP); xlim([0 11]); xlabel('Nmb of path'); ylabel('tau profile'); %plotting tau-profile;
    subplot(3,2,k+4); plot(t,Sbpres); ylim([-7 7]); xlabel('t/T'); ylabel(YL2); grid; %plotting resultant signal of k-th branch;
end;

⌨️ 快捷键说明

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