| Communications Toolbox | ![]() |
Decode ASCII file that was encoded using Reed-Solomon code
rsdecof(file_in,file_out); rsdecof(file_in,file_out,err_cor);
This function is the inverse process of the function rsencof in that it decodes a file that rsencof encoded.
rsdecof(file_in,file_out) decodes the ASCII file file_in that was previously created by the function rsencof using an error-correction capability of 5. The decoded message is written to file_out. Both file_in and file_out are string variables.
Note If the number of characters in file_in is not an integer multiple of 127, then the function appends char(4) symbols to the data it must decode. If you encode and then decode a file using rsencof and rsdecof, respectively, then the decoded file might have char(4) symbols at the end that the original file does not have. |
rsdecof(file_in,file_out,err_cor) is the same as the first syntax, except that err_cor specifies the error-correction capability for each block of 127 codeword characters. The message length is 127 - 2 *err_cor. The value in err_cor must match the value used in rsencof when file_in was created.
An example is on the reference page for rsencof.
| rsdec | rsenc | ![]() |
© 1994-2005 The MathWorks, Inc.