通信人家园

 找回密码
 注册

只需一步,快速开始

短信验证,便捷登录

搜索

军衔等级:

  新兵

注册:2012-3-26
跳转到指定楼层
1#
发表于 2014-8-14 09:58:48 |只看该作者 |倒序浏览
%This is the main program to realize a (244,212) RS encoding in GF(2^8)
%primitive polynomial in GF(2^8): x^8+x^7+x^2+x+1,
%generator polynomial g(x)=П (x-α^11j)=ПG(i)x^i,j=112:143,i=0:33


N=244;%codeword length 244
K=212;%information sequence length 212
shorten=11;%the number of '0' shortened
range=11*(112:143);%the range of the exponential of α in polynomial
prim_poly=391;%the decimal presentation of primitive polynomial

CN=N-K;%Checkcode's number

n=N+shorten;%the length of original signal
msg=randint(1,K,[0,n]);%generate random information sequence
genpoly=rs_genpoly(N,K,prim_poly,range);%Call the function to generate the coefficients of the polynomial
cc=rs_encode(K,CN,msg,genpoly);%Call the function to get the check code
mcode=[msg,cc]%Combine  the information code and test code to get the encoded results
这是主程序,里面程序的第三行shorten 是干嘛的

举报本楼

本帖有 1 个回帖,您需要登录后才能浏览 登录 | 注册
您需要登录后才可以回帖 登录 | 注册 |

手机版|C114 ( 沪ICP备12002291号-1 )|联系我们 |网站地图  

GMT+8, 2024-11-29 02:21 , Processed in 0.109466 second(s), 15 queries , Gzip On.

Copyright © 1999-2023 C114 All Rights Reserved

Discuz Licensed

回顶部