| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| R2010b Documentation → Communications Toolbox |
| Contents | Index |
| Learn more about Communications Toolbox |
enc = fec.rsenc
enc = fec.rsenc(N,K)
enc = fec.rsenc(property1, ...)
enc = fec.rsenc(rsdec_object)
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.
A Reed-Solomon encoder object has the following properties, all of which are writable, except for the ones explicitly noted otherwise.
| Property | Description |
|---|---|
| Type | The 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. |
| N | The codeword length of the base code, not including shortening or puncturing. |
| K | The uncoded message length, not including shortening. |
| T | The number of errors the base code is capable of correcting. This property is not writable. |
| ShortenedLength | The number of symbols by which the code has been shortened. |
| ParityPosition | Must be 'beginning' or 'end'. Specifies if parity symbols should appear at the beginning or end of the codeword. |
| GenPoly | The 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. |
The fec.rsenc object has a method for encoding messages.
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.
% 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);

Learn how to apply early verification to your development process through these technical resources.
How much time do you spend on testing to ensure implementation meets system-level requirements?
| © 1984-2010- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |