m=12; n=2^m-1; t=2; k=2^m-1-m*t; simplified = 1; %the constants used in the algorithm alpha = gf(2, m); zero = gf(0, m); one = gf(1, m); %since all zero is always a codeword, only have to specify the error %code = zeros(1, n); code=gf(zeros(1, n), 1); code(1)=gf(1, 1); code(2)=gf(1, 1); codev =