channelplot.m
来自「JAKES 模型的具体实现,应用瑞利衰落信道的特性」· M 代码 · 共 38 行
M
38 行
%%
%% Plot the Raleigh channel taps;
fd = 200;
N = 200000; % N >200000,or it will distory the gaussian of the WGN;
h = TDL(fd,N);
h_dB = 20*log10(abs(h)+eps);
y = h_dB(64001:128000,:);
x=[1:length(y)]/256;
h2=zeros(64000,4);
h3=1./h2;
h3([1600:1600:64000],:)=y([1600:1600:64000],:);
plot(x,h3(:,[1]),'*',x,h3(:,[2]),'v',x,h3(:,[3]),'o',x,h3(:,[4]),'d',x,y(:,[1]),x,y(:,[2]),x,y(:,[3]),x,y(:,[4]));
xlabel('Time(ms)');ylabel('Channel Amp(dB)');
title('Raleigh Channel');
legend('Tap 1;','Tap 2','Tap 3','Tap 4');
grid on;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
pause;
subplot(2,2,1); plot(x,y(:,[1]));
grid on; xlabel('Time(ms)'); ylabel('Channel Amp(dB)');
title('Raleigh Channel'); legend('Tap 1',4);
subplot(2,2,2); plot(x,y(:,[2]));
grid on;xlabel('Time(ms)');ylabel('Channel Amp(dB)');
title('Raleigh Channel');legend('Tap 2',4);
subplot(2,2,3);plot(x,y(:,[3]));grid on;xlabel('Time(ms)');ylabel('Channel Amp(dB)');
title('Raleigh Channel');legend('Tap 3',4);
subplot(2,2,4);plot(x,y(:,[4]));grid on;xlabel('Time(ms)');ylabel('Channel Amp(dB)');
title('Raleigh Channel');legend('Tap 4',4);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?