gfweight
Calculate minimum distance of linear block code
Syntax
wt = gfweight(genmat)
wt = gfweight(genmat,'gen')
wt = gfweight(parmat,'par')
wt = gfweight(genpoly,n)
Description
The minimum distance, or minimum weight, of a linear block code is defined as the smallest positive number of nonzero entries in any n-tuple that is a codeword.
wt = gfweight(genmat) returns
the minimum distance of the linear block code whose generator matrix
is genmat.
wt = gfweight(genmat,' returns
the minimum distance of the linear block code whose generator matrix is
gen')genmat.
wt = gfweight(parmat,' returns
the minimum distance of the linear block code whose parity-check matrix is
par')parmat.
wt = gfweight(genpoly,n) returns
the minimum distance of the cyclic code whose
codeword length is n and whose generator polynomial
is represented by genpoly. genpoly is
a polynomial character vector or
a row vector that gives the coefficients of the generator polynomial
in order of ascending powers.
Examples
Version History
Introduced before R2006a