fec.rsenc - Construct Reed-Solomon encoder object

Synopsis

enc = fec.rsenc

enc = fec.rsenc(N,K)

enc = fec.rsenc(property1, ...)

enc = fec.rsenc(rsdec_object)

Description

enc = fec.rsenc constructs a Reed-Solomon encoder with default properties equivalent to: enc = rsenc(7,3)

enc = fec.rsenc(N,K) constructs an (N,K) Reed-Solomon encoder object enc.

enc = fec.rsenc(property1, value1, ...) constructs a Reed-Solomon encoder object enc with properties as specified by PROPERTY/VALUE pairs.

enc = fec.rsenc(rsdec_object) constructs a Reed-Solomon encoder object enc by reading the property values from the RS decoder object rsdec_object.

Properties

A Reed-Solomon encoder object has the following properties, all of which are writable, except for the ones explicitly noted otherwise.

PropertyDescription
TypeThe type of encoder object. This property also displays the effective message length and codeword length, taking shortening and puncturing into consideration. This property is not writable.
NThe codeword length of the base code, not including shortening or puncturing.
KThe uncoded message length, not including shortening.
TThe number of errors the base code is capable of correcting. This property is not writable.
ShortenedLengthThe number of symbols by which the code has been shortened.
ParityPositionMust be 'beginning' or 'end'. Specifies if parity symbols should appear at the beginning or end of the codeword.
GenPolyThe generator polynomial for the code. GenPoly must be a Galois row vector that lists the coefficients, in order of descending powers, of the generator polynomial.

Methods

The fec.rsenc object has a method for encoding messages.

codeword =encode(enc, msg)

Encodes MSG using the Reed-Solomon code specified by a Reed-Solomon encoder object ENC. MSG must be an array of integer elements, with an integer multiple of K-ShortenedLength elements per column. There may be multiple codewords per channel, where each group of K-ShortenedLength input elements represents one message word to be encoded. Each column of MSG is considered to be a separate channel, with the same Reed-Solomon code applied to each channel.

Usage Examples

% Create Reed-Solomon encoder object.
enc = fec.rsenc(7,3);
 
% Create a message to be encoded.
msg = [0 1 0]'; 
 
% Encode msg with the ENCODE function.
code = encode(enc,msg);
 
% Create a shortened encoder
encShort = copy(enc);
encShort.ShortenedLength = 1;
 
% Create a shortened message
msgShort = [0 1]';
 
codeShort = encode(encShort,msgShort);
  


 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS