?? channelplot.m
字號:
%%
%% 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 + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -