--- a/inst/encode.m +++ b/inst/encode.m @@ -36,30 +36,34 @@ ## 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 coded message @var{code} being in ## a binary format. In this case the argument @var{opt} is the generator ## matrix, and is required. -## @item 'cyclic' or 'cyclic/binary' +## @item "cyclic" +## @itemx "cyclic/binary" ## A cyclic code is assumed with the coded message @var{code} being in a ## binary format. The generator polynomial to use can be defined in @var{opt}. ## The default generator polynomial to use will be ## @code{cyclpoly (@var{n}, @var{k})} -## @item 'hamming' or 'hamming/binary' +## @item "hamming" +## @itemx "hamming/binary" ## A Hamming code is assumed with the coded message @var{code} 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} ## must be @code{@var{n}-@var{m}}. The primitive polynomial to use can ## be defined in @var{opt}. The default primitive polynomial to use is ## the same as defined by @code{hammgen}. -## @item 'bch' or 'bch/binary' +## @item "bch" +## @itemx "bch/binary" ## A BCH code is assumed with the coded message @var{code} being in a binary ## format. The generator polynomial to use can be defined in @var{opt}. ## The default generator polynomial to use will be ## @code{bchpoly (@var{n}, @var{k})} ## @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 @@ -80,7 +84,7 @@ ## it is often faster to create a generator matrix externally with the ## functions @code{hammgen} or @code{cyclgen}, rather than let @code{encode} ## recalculate this matrix at each iteration. In this case @var{typ} should -## be 'linear'. The exception to this case is BCH codes, whose encoder +## be "linear". The exception to this case is BCH codes, whose encoder ## is implemented directly from the polynomial and is significantly faster. ## ## @seealso{decode, cyclgen, cyclpoly, hammgen, bchenco, bchpoly} @@ -189,7 +193,7 @@ else m = log2 (n + 1); if ((m != floor (m)) || (m < 3) || (m > 16)) - error ("encode: codeword length must be of the form '2^m-1' with integer m"); + error ("encode: codeword length must be of the form 2^m-1 with integer m"); endif if (k != (n-m)) error ("encode: illegal message length for hamming code");