• 大小: 7KB
    文件类型: .m
    金币: 2
    下载: 0 次
    发布日期: 2024-02-06
  • 语言: Matlab
  • 标签: SCL  

资源简介

极化码SCL译码算法的MATLAB

资源截图

代码片段和文件信息

function [Lcc]=yima(Mne)
%y=1:2^n;
%Y=daoweixu(yn);
%LL=-ones(12^n);
%for i=1:2^n
 %   LL(i)=M(Y(i));
%end
w0=1-e;
w1=e;
W0=e;
W1=1-e;
LL=daoweixu(Mn);
for i=1:2^n
    if (LL(i)==0)
        LL(i)=w0/w1;
    else
        LL(i)=W0/W1;
    end
end
[~P]=polarize(ne);
L=-ones(2^nn+1)*0.1;
L(:n+1)=LL;
u=-ones(12^n);
S=-ones(2^nn);           %%%%%%%%%   L S V 初始化为-1的矩阵
V=-ones(12^n-2);
for j=1:n             %指数项矩阵右上角初始赋值0
    for i=1:2^(j-1)
        S(ij)=0;
    end
end
l=1;
while(l<=2^n)
    if (P(l)~=1)
        u(l)=0;
    else
        j=1;
        i=l;
        if (l>1)                 %%%%%%%%
            S(l1)=u(l-1);
        end                       %%%%%%%%
        if (l>2)
            if (mod(l2)==0)
                p=l-2;                
                for t=1:p
                    V(t)=u(t);
                end
            else
                p=l-1;
                for t=1:p
                    V(t)=u(t);
                end
            end
        end
        while(j            if (rem(fix((i-1)/(2^(j-1)))2)==1)
                if (L(i-2^(j-1)j+1)==-0.1)
                       %%%%%%%%%%%%%%%%%%%%%子程序2   这里 
                            if (l>=3)                        
                                p=fix((p+1)/2);
                                for q=1:p
                                    V(q)=mod(V(2*q-1)+V(2*q)2);
                                end
                                i=i-2^(j-1);
                                j=j+1;
                                if(S(ij)==-1)
                                    S(ij)=V(p);
                                %else
                                 %   if (V(p)~=S(ij))
                                  %      k=10000000
                                   % end
                                end
                                i;
                                j;
                                V;
                            else
                                i=i-2^(j-1);
                                j=j+1;
                            end
                    elseif (L(i-2^(j-1)j+1)~=-0.1&&L(ij+1)==-0.1)
                             %%%%%%%%%%%%%%%%%%%%%子程序4                           
                            if (l>=3)
                                p=fix((p+1)/2);
                                for q=1:p
                                    V(q)=V(2*q);
                                end
                                j=j+1;
                                if(S(ij)==-1)
                                    S(ij)=V(p);
                               % else
                                %    if (V(p)~=S(ij))
                                 %       k=10000000
                                   % end
                                end
                                i;
                                j;
                                V;
              

评论

共有 条评论