mul_gf2.m
来自「本源码用于LDPC的编码算法。运用LDPC编码的基本原理」· M 代码 · 共 29 行
M
29 行
%*************************************************************%
%函数名:mul_GF2
%功能: 实现矩阵A*B
%参数: 矩阵A,B
%返回值:A*B
%*************************************************************%
function [c]=mul_GF2(A,B)
%[c]=mul_GF2(A,B)
dim=size(A);
m=dim(1);%no of rows of the first matrix
n=dim(2);%no of cols of the first matrix and no of rows of 2nd matrixdim=size(B);p=dim(2);%no of cols of the second matrixfor i=1:m for j=1:p temp1=A(i,1:n); temp2=B(1:n,j); prod=temp1.*(temp2.'); sum1=0; for k=1:n sum1=xor(sum1,prod(k)); end c(i,j)=sum1; endend
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?