Sign in

username or email:

password:



Not a member?
Forgot your password?

Search code



Search tips

Ads

See Also

Embedded SystemsFPGA

DSP Code Sharing > Convolutional coding using transform domain approach

Convolutional coding using transform domain approach

Language: Scilab

Processor: Not Relevant

Submitted by Senthilkumar R on Mar 28 2012

Licensed under a Creative Commons Attribution 3.0 Unported License

Convolutional coding using transform domain approach


 

This function is used to find convolutional encoder output using transform domain approach

 
function [x1D,x2D]= ConvolutionCode_TransDomain()        
//Convolutional code - Transform domain approach
//g1D =  generator polynomial 1
//g2D =  generator polynomial 2
//x1D = top output sequence polynomial
//x2D = bottom output sequence polynomial
D = poly(0,'D');
g1D = input('Enter the generator polynomial 1=') //generator polynomial 1
g2D = input('Enter the generator polynomial 2=') //generator polynomial 2
mD = input('Enter the message sequence')//message sequence polynomial representation
x1D = g1D*mD; //top output polynomial
x2D = g2D*mD; //bottom output polynomial
x1 = coeff(x1D);
x2 = coeff(x2D);
disp(modulo(x1,2),'top output sequence')
disp(modulo(x2,2),'bottom output sequence')
endfunction
//Result
//Enter the generator polynomial 1 =  1+D+D^2
//Enter the generator polynomial 2 =  1+D^2;
//Enter the message sequence = 1+0+0+D^3+D^4;
//top output sequence  
//
//    1.    1.    1.    1.    0.    0.    1.  
//bottom output sequence  
//
//    1.    0.    1.    1.    1.    1.    1.  
//x2D  =
//
//         2   3   4   5   6  
//    1 + D + D + D + D + D  
//x1D  =
//
//             2   3    4    5   6  
//    1 + D + D + D + 2D + 2D + D  
 
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? )