]> AND Private Git Repository - canny.git/blob - stc/exp/ml_stc_linux_make_v1.0/matlab/STC matlab implementation/example1.m
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
f92176282831a26e79d467522f55911e24860977
[canny.git] / stc / exp / ml_stc_linux_make_v1.0 / matlab / STC matlab implementation / example1.m
1 clc; clear;
2
3 H_hat = [7 5 1];
4
5 H = create_pcm_from_submatrix(H_hat, 3)
6 draw_pcm(H);
7
8 % code = structure with all necesary components
9 code = create_code_from_submatrix(H_hat, 3);
10 w = ones(code.n,1);
11 x = double(rand(code.n,1)<0.5);
12 m = double(rand(sum(code.shift),1)<0.5);
13 [y min_cost] = dual_viterbi(code, x, w, m);
14 x = x'; x
15 y = y'; y
16 m = [m' ; calc_syndrome(code,y)']; m
17 min_cost