Sign in

username or email:

password:



Not a member?
Forgot your password?

Search code



Search tips

Ads

See Also

Embedded SystemsFPGA

DSP Code Sharing > Reed Solomon Codes

Reed Solomon Codes

Language: Scilab

Processor: Not Relevant

Submitted by Senthilkumar R on Mar 28 2012

Licensed under a Creative Commons Attribution 3.0 Unported License

Reed Solomon Codes


 

This funtion is used to generate single error correcting RS code with a 2 bit byte

 
function[n,p,r] = ReedSolomon_Codes(m)

// Reed-Solomon Codes
//Single-error-correcting RS code with a 2-bit byte
//m = m-bit symbol
k = 1^m; //number of message bits
t =1; //single bit error correction
n = 2^m-1; //code word length in 2-bit byte
p = n-k; //parity bits length in  2-bit byte
r = k/n; //code rate
disp(n,'code word length in 2-bit byte n =')
disp(p,'parity bits length in  2-bit byte n-k=')
disp(r,'Code rate:r = k/n =')
disp(2*t,'It can correct any error upto =')
endfunction
//Result
//-->exec('C:\Users\SENTHILKUMAR\Desktop\Communication_Toolbox\Digital_Communication\ReedSolomon_Codes.sci', -1)
//
//-->m=2
// m  =
//
//    2.  
//
//-->[n,p,r] = ReedSolomon_Codes(m)
//
// code word length in 2-bit byte n =  
//
//    3.  
//
// parity bits length in  2-bit byte n-k=  
//
//    2.  
//
// Code rate:r = k/n =  
//
//    0.3333333  
//
// It can correct any error upto =  
//
//    2.  
// r  =
//
//    0.3333333  
// p  =
//
//    2.  
// n  =
//
//    3.  
//
 
Rate this code snippet:
0
Rating: 0 | Votes: 0
 
   
 
posted by Senthilkumar R



Comments


No comments yet for this code


Add a Comment
You need to login before you can post a comment (best way to prevent spam). ( Not a member? )