Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- clc;
- k = 12;
- g = [1 1 0 0 0 1 1 1 0 1 0 1];
- c = zeros(2^k, 23);
- for i = 1:1:2^k
- d = [];
- aux = dec2bin(i - 1, k);
- for j = 1:1:k;
- if(part(aux, j) == '1')
- d = [d 1];
- else
- d = [d 0];
- end
- end
- c(i, :) = modulo(conv(d, g), 2);
- peso(i) = sum(c(i, :));
- end
- peso = - gsort(-peso);
- dmin = peso(2);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement