pr3_33.m

来自「关于扩频通信的一些基本模块」· M 代码 · 共 16 行

M
16
字号
%Problem 3.33;
%Illustrates the space diversity principle; 

clear all; close all;
t=[1:3000]/1000; %time scale;
f0=25.1; %carrier frequency;
S=exp(-16*(t-1.5).^2); Sbp=real(S.*exp(i*2*pi*f0*t)); %signal envelope and bandpass version;
for k=1:2 %in the loop two resultant signals are calculated for two different delay profiles;
    subplot(3,2,k); plot(t,Sbp); ylim([-1.2 1.2]); xlabel('t/T'); ylabel('signal'); grid; %replotting the same signal for both profiles;
    TP=(unidrnd(100,1,10)-1)/100; %tau profile for k-th antenna;
    subplot(3,2,k+2); stem(TP); xlim([0 11]); xlabel('number of path'); ylabel('tau profile'); %plotting k-th tau-profile;
    AR=sum(exp(i*2*pi*f0*TP));  %k-th profile resulting real amplitude;
    Sbp1=abs(AR)*Sbp; %k-th profile resulting bandpass signal;
    YL=num2str(k); YL=['rec sig ant ',YL]
    subplot(3,2,k+4); plot(t,Sbp1); ylim([-7 7]); xlabel('t/T'); ylabel(YL); grid; %plotting it;
end;

⌨️ 快捷键说明

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