?? convencoder.m
字號:
function [out] = convencoder(din,trellis)
%卷積碼編碼器
%輸入:din {0,1}序列碼流
% trellis Matlab格式網格結構(可以用poly2trellis獲得)
%初態為0
curState = 0;
for k=1:length(din)
d(k) = trellis.outputs( curState+1,din(k)+1 );
curState = trellis.nextStates( curState+1, din(k)+1 );
end
N = floor( log2(trellis.numOutputSymbols) );
out = dec2bin(d,N)-48;
out = reshape(out',1,N*length(din));
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -