Reed Solomon encoding/decoding for binary data
Show older comments
I want to encode a binary data with the rsenc. It does the work but it generates random integer parities appenended in the end of the data vector. And when I try to manipulate it with adding random binary values and then pass it through the decoder all the results are messed up. I do get the final result correctly but the rest of the properties are all messed up. Here's one small example of what I did.
message_in_bin_enc = rsenc(message_in_bin_gf,n,k); % example message is [0 0 1] as a galois field.
bin_Rs_enc = message_in_bin_enc;
binRandom = randi([0 1],1,4);
bin_Rs_enc (1,4)= binRandom(1,1);
bin_Rs_enc (1,5)= binRandom(1,2);
bin_Rs_enc (1,6)= binRandom(1,3);
bin_Rs_enc (1,7)= binRandom(1,4);
%So here I tried to manipulate the parity bits with my very own random
%binary bits cause I need the entire data as a binary stream.
% Let's say now the message looks something like [0 0 1 0 0 0 1] assuming
% its a (7,3) RS code.
%Then once it passes through my circuit which (can)randomly flips the
%message bits. e.g : [0 1 0 0 0 0 0] (error)
error = gf(bin_Rs_enc_1,m); % bin_Rs_enc_1 is when it passes through the ciruit and error in introduced.
[corrected_message,sheesh] = rsdec(error,n,k);
%Now if I decode all the results are butchered up for some odd reason tho I
%get the correct final ans.
Please guide me through this. Thank you in advance.
Accepted Answer
More Answers (0)
Categories
Find more on Error Detection and Correction in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!