Binary String Generator With Minimum Distance
Mostrar comentarios más antiguos
How do I generate 20 strings of binary numbers each of which are a minimum distance of 3 from all of the other strings?
Respuesta aceptada
Más respuestas (1)
Lawrence Paul
el 25 de En. de 2024
0 votos
How can i implement matlab in computing the d_min for hamming code? Here is my code;
clear all;
close all;
clc;
m = 4;
n = 2^m-1; % length of the code
k = 5; % dimension of the code
[genpoly,t] = bchgenpoly(n,k) % compute generating polynomial and ecc
disp(genpoly); % coefficients of generator polynomial in descending order
disp(t); % error correcting capability
T = bchnumerr(n); %computes correctable errors of the BCH code under given parameter conditions
disp(T);
% possible values of k when n = 31 are 26,21,16,11,6 and correctable errors
% are 1,2,3,5,7 respectively
msg = gf([1 0 1 0 1 ; 0 1 0 1 0 ])
code = bchenc(msg,n,k); %encoding the bch code
display(code);
Categorías
Más información sobre Hamming en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!