3 % either use optimized matrix H_hat
4 load('dv_best_submatrices.mat');
5 H_hat = double(submatrices{3,7}); % constraint length 7 and width 3.
6 % Not all combinations are known.
8 H = create_pcm_from_submatrix(H_hat, 50);
11 % code = structure with all necesary components
12 code = create_code_from_submatrix(H_hat, 50);
14 x = double(rand(code.n,1)<0.5);
15 m = double(rand(sum(code.shift),1)<0.5);
17 [y min_cost] = dual_viterbi(code, x, w, m);
19 if (all(m'==calc_syndrome(code,y)'))
20 fprintf('Message extracted without any error.\n');