orthogonality.m

来自「LDPC codes .Using the matlab.」· M 代码 · 共 30 行

M
30
字号
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function lambda = Orthogonality(checkMatrix_H)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% @author   Andreas Waadt, 13. November 2005
% @param     checkMatrix_H : the parity check matrix of the code
% @return   lambda : the orthogonality of checkMatrix_H
% This function calculates the orthogonality (lambda) of a 
% Parity-Check-Matrix H (checkMatrix_H).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

sizeOfMatrix = size(checkMatrix_H);
j_rows = sizeOfMatrix(1);
n_columns = sizeOfMatrix(2);

		lambda = 0;
		scalar_product = 0;
		for column1 = 1 : 1 : n_columns-1
			for column2 = column1+1 : 1 : n_columns
				scalar_product = 0;
				for row = 1 : 1 : j_rows
					scalar_product = scalar_product + checkMatrix_H(column1,row) * checkMatrix_H(column2,row);
                end;
				if(scalar_product > lambda)
					lambda = scalar_product;
                end;
            end;
        end;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

⌨️ 快捷键说明

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