软件大小: | 3 K | ||
上传用户: | wzsq12 | ||
关键词: | rsc_encede encode_bit encederm MATLAB | ||
下载地址: | 免注册下载 普通下载 |
相关代码 |
|
function [output, state] = encode_bit(g, input, state) [n,k] = size(g); m = k-1; for i=1:n output(i) = g(i,1)*input; for j = 2:k output(i) = xor(output(i),g(i,j)*state(j-1)); end; end state = [input, state(1:m-1)];