欢迎您访问辣妈网

Matlab实现卷积编码

2012-11-28 编辑:knwz 来源:辣妈网 阅读次数:
  导读: function ConCode = ConEncode(OrigiSeq, Length) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%该函数实现卷积编码 %%%%其中OrigiSeq为要编码的原始序列,并且已经添加了尾比特 %%%%Length为原始序列的长度 %%%%ConCode为编好的码字 %%%%%%%%%%%%%%%%%...

function ConCode = ConEncode(OrigiSeq, Length)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%该函数实现卷积编码
%%%%其中OrigiSeq为要编码的原始序列,并且已经添加了尾比特
%%%%Length为原始序列的长度
%%%%ConCode为编好的码字
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


ConCode1 = mod(conv(OrigiSeq, [1,1,1]), 2);%上支路卷积编码输出
ConCode2 = mod(conv(OrigiSeq, [1,0,1]), 2);%下支路卷积编码输出
ConCode1 = ConCode1(1:Length);
ConCode2 = ConCode2(1:Length);
ConCode = zeros(1,2*Length);
??for j = 1 : Length
????ConCode(2*j-1) = ConCode1(j);
????ConCode(2*j) = ConCode2(j);
??end

文章出自:辣妈网www.matlabjc.com,尊重版权是美德,转载请保留原地址,感谢合作!

联系我们 | 广告服务 | 诚聘英才 | 友情链接 | 版权声明 | 关于我们 | 网站地图
辣妈网 - 时尚潮流辣妈必逛的育儿网站 - 凯娜科技
辣妈网 时尚潮流辣妈必逛的育儿网站 服务QQ:790646582 e-mail:zk8312@163.com
Copyright @ 辣妈网 2014 All Rights Reserved | 吉ICP备14005127号-2
本站部分资源来自网友上传,如果无意之中侵犯了您的版权,请联系本站,本站将在3个工作日内删除。