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

📄 multipath.m

📁 水声通信中的psk方法
💻 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 + -