?? cnv_encd3.m
字號:
function the_output1=cnv_encd3(mybit) %the_output1為完全正確譯碼,編碼輸出結果多出2*移位寄存器個數; the_output2為不完全譯碼,譯碼結果與編碼之前的原始信息差移位寄存器的個數
g=[1 1 1 0 1 1];
n=length(mybit);
juzhen=zeros(n,(n-1)*2+6); %多余個數=2*約束長度-2=2*移位寄存器個數
for i=1:n
juzhen(i,(i-1)*2+1:(i-1)*2+6)=g;
end
the_output=mybit*juzhen;
the_output=mod(the_output,2);
the_output1=the_output;
the_output2=the_output(1,1:n*2);
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -