--- a/inst/decode.m +++ b/inst/decode.m @@ -39,18 +39,21 @@ ## variable is a string taking one of the values ## ## @table @code -## @item 'linear' or 'linear/binary' +## @item "linear" +## @itemx "linear/binary" ## A linear block code is assumed with the message @var{msg} being in a ## binary format. In this case the argument @var{opt1} is the generator ## matrix, and is required. Additionally, @var{opt2} containing the ## syndrome lookup table (see @code{syndtable}) can also be passed. -## @item 'cyclic' or 'cyclic/binary' +## @item "cyclic" +## @itemx "cyclic/binary" ## A cyclic code is assumed with the message @var{msg} being in a binary ## format. The generator polynomial to use can be defined in @var{opt1}. ## The default generator polynomial to use will be ## @code{cyclpoly (@var{n}, @var{k})}. Additionally, @var{opt2} containing the ## syndrome lookup table (see @code{syndtable}) can also be passed. -## @item 'hamming' or 'hamming/binary' +## @item "hamming" +## @itemx "hamming/binary" ## A Hamming code is assumed with the message @var{msg} being in a binary ## format. In this case @var{n} must be of an integer of the form ## @code{2^@var{m}-1}, where @var{m} is an integer. In addition @var{k} @@ -58,7 +61,8 @@ ## be defined in @var{opt1}. The default primitive polynomial to use is ## the same as defined by @code{hammgen}. The variable @var{opt2} should ## not be defined. -## @item 'bch' or 'bch/binary' +## @item "bch" +## @itemx "bch/binary" ## A BCH code is assumed with the message @var{msg} being in a binary ## format. The primitive polynomial to use can be defined in @var{opt2}. ## The error correction capability of the code can also be defined in @@ -66,7 +70,7 @@ ## capability take the default value. ## @end table ## -## In addition the argument 'binary' above can be replaced with 'decimal', +## In addition the argument "binary" above can be replaced with "decimal", ## in which case the message is assumed to be a decimal vector, with each ## value representing a symbol to be coded. The binary format can be in two ## forms @@ -79,9 +83,9 @@ ## @end table ## ## The decoded message is return in @var{msg}. The number of errors encountered -## is returned in @var{err}. If the coded message format is 'decimal' or a -## 'binary' matrix, then @var{err} is a column vector having a length equal -## to the number of decoded symbols. If @var{code} is a 'binary' vector, then +## is returned in @var{err}. If the coded message format is "decimal" or a +## "binary" matrix, then @var{err} is a column vector having a length equal +## to the number of decoded symbols. If @var{code} is a "binary" vector, then ## @var{err} is the same length as @var{msg} and indicated the number of ## errors in each symbol. If the value @var{err} is positive it indicates the ## number of errors corrected in the corresponding symbol. A negative value @@ -96,7 +100,7 @@ ## it is often faster to create a generator matrix externally with the ## functions @code{hammgen} or @code{cyclgen}, rather than let @code{decode} ## recalculate this matrix at each iteration. In this case @var{typ} should -## be 'linear'. The exception to this case is BCH codes, where the required +## be "linear". The exception to this case is BCH codes, where the required ## syndrome table is too large. The BCH decoder, decodes directly from the ## polynomial never explicitly forming the syndrome table. ## @@ -231,7 +235,7 @@ else m = log2 (n + 1); if ((m != floor (m)) || (m < 3) || (m > 16)) - error ("decode: codeword length must be of the form '2^m-1' with integer m"); + error ("decode: codeword length must be of the form 2^m-1 with integer m"); endif if (k != (n-m)) error ("decode: illegal message length for hamming code");