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

📄 puncture.m

📁 802.15 dsss 物理协议层方针代码
💻 M
字号:
function puncture_output=puncture(decode_output,datarate)
%
%Puncture
%
%puncturing of the encoded data to increase the coding rate
%
%DS-UWB PHY 802.15
%punctured coding rate = 3/4
%
%Author: Liu Hantao
%
%==============================================================
%check the input arguments

if (nargin >2)
    error('incorrect number of input document')
end
if (datarate~=660)||(datarate~=1320)%modified by G. Jin in 28/Feb/2005
    %check the length of the decode_output data
    if rem(length(decode_output),18) > 0
        decode_output=[decode_output,zeros(size(1:18-rem(length(decode_output),18)))];
    end
    n=length(decode_output)/18;
    %==============================================================
    %start puncturing the encoded data
    input=reshape(decode_output,2,[ ]);
    puncture_output=zeros(1,12*n);
    for i=0:n-1
        j=9*i;
        l=12*i;
        puncture_output(l+1:l+12)=[input(1,j+1),input(2,j+1),input(1,j+2),input(2,j+3),input(1,j+4),...
            input(2,j+4),input(1,j+5),input(2,j+6),input(1,j+7),input(2,j+7),input(1,j+8),input(2,j+9)];
    end
else

    puncture_output=decode_output;
end
    

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -