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

📄 b2_loh.asv

📁 Matlab实现SONET/SDH光通信系统simulink仿真程序源代码
💻 ASV
字号:
function [hh]=B2_LOH(poh)

%%%=======%%%
load('B3Tx');
[s v]=size(b3);
[a b]=size(poh);
r=a/9;
dd=zeros(r,v);
dd(1:s,:)=b3(:,:);
%%%=======%%%



for y=1:r %Controla el numero de tramas
    h=(y-1)*9;
    for w=1:8 %Controla el tamano del B2
        b2(y,w)=0;
        for f=4:9 %Controla las filas con las que se va a trabajar
            c=w;
            while c<=24 %Controla el numero de columnas
                b2(y,w)=xor(b2(y,w),poh((f+h),c));
                c=c+8;
            end
        end
        b2(y,w)=xor(b2(y,w),dd(y,w));
    end
          
    % Escribe el B2 calculado en la posicion correspondiente
    poh((5+h),1:8)=b2(y,:);
end

hh=poh(:,:);

save('B2Tx');

⌨️ 快捷键说明

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