?? multipath.m
字號:
function result=multipath(result0);
%新多徑
Fs=5000;
%r=input('請輸入傳數距離(km)(10,20,30,80)r=');
r=10;
%f0=input('請輸入中心頻率(kHz)(3或者5)f0=');
f0=1800;
multipath_cacu=[];
switch r
case 10
%10km,5kHz信號,20ms保護時間
multipath_cacu(:,1)=[0 0.01275 0.0068333]';
multipath_cacu(:,2)=[1 0.62736 0.60346]';
% multipath_cacu(:,1)=[0 0.01275 0.0068333]';
% multipath_cacu(:,2)=[1 0.62736 0.60346]';
end
multipath_cacu=sortrows(multipath_cacu,1);
[m_multipath,n_multipath]=size(multipath_cacu);
h=zeros(round(multipath_cacu(end,1))*Fs+1,1);
for i=1:m_multipath
h(round(multipath_cacu(i,1)*Fs)+1)=multipath_cacu(i,2);
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% figure(4)
% t=(1:length(h))*1000/Fs;
% plot(t,h);
% legend('Multipath in time domain');
result=conv(result0,h);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% SL=194;
% switch f0
% case 5
% NL=54;
% case 3
% NL=56;
% end
% TL=20*log10(r*1000)+0.036*f0^(3/2)*r+15;
% SNR=SL-TL-NL-10*log10(Fs/2);
% %SNR=SL-TL-NL-10*log10(2000)%2000為帶寬
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -