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

📄 pr3_33.m

📁 Spread Spectrum and CDMA Principles and Applications 书籍和代码
💻 M
字号:
%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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -