Home Online Manual
Top
Back: errorRand
Forward: genMDSMat
FastBack:
FastForward:
Up: decodegb_lib
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

D.10.2.10 randomCheck

Procedure from library decodegb.lib (see decodegb_lib).

Usage:
randomCheck(m, n, e); m,n,e are int
 
          - m x n are dimensions of the matrix,
          - e is an extension degree (if one wants values to be from GF(p^e))

Return:
random check matrix

Example:
 
LIB "decodegb.lib";
int redun=5; int n=15;
ring r=2,x,dp;
//generate random check matrix for a [15,5] binary code
matrix h=randomCheck(redun,n,1);
print(h);
==> 0,1,0,0,0,1,1,1,0,1,1,0,0,0,0,
==> 1,1,0,0,0,0,0,1,0,0,0,1,0,0,0,
==> 1,0,1,1,1,1,0,0,0,1,0,0,1,0,0,
==> 1,1,0,1,1,0,0,0,0,1,0,0,0,1,0,
==> 0,1,0,0,0,0,0,1,1,0,0,0,0,0,1 
//corresponding generator matrix
matrix g=dual_code(h);
print(g);
==> 0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,
==> 0,0,1,0,0,1,1,0,0,0,0,0,0,0,0,
==> 0,1,1,1,0,0,0,1,0,0,0,0,0,0,0,
==> 1,1,0,0,0,1,0,0,1,0,0,0,0,0,0,
==> 0,0,1,1,0,1,0,0,0,1,0,0,0,0,0,
==> 0,0,1,0,0,1,0,0,0,0,1,0,0,0,0,
==> 1,0,0,1,0,0,0,0,0,0,0,1,0,0,0,
==> 0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,
==> 0,0,1,1,0,0,0,0,0,0,0,0,0,1,0,
==> 1,1,0,0,0,1,0,0,0,0,0,0,0,0,1