bin_state.m
来自「It is turbo encoder and decoder qritten 」· M 代码 · 共 18 行
M
18 行
function bin_state = bin_state( int_state, m )
% Copyright Matt C. Valenti
% MPRG lab, Virginia Tech
% for academic use only
% converts an vector of integer into a matrix; the i-th row is the binary form
% of m bits for the i-th integer
for j = 1:length( int_state )
for i = m:-1:1
state(j,m-i+1) = fix( int_state(j)/ (2^(i-1)) );
int_state(j) = int_state(j) - state(j,m-i+1)*2^(i-1);
end
end
bin_state = state;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?