Binary String Generator With Minimum Distance
Afficher commentaires plus anciens
How do I generate 20 strings of binary numbers each of which are a minimum distance of 3 from all of the other strings?
Réponse acceptée
Plus de réponses (1)
Lawrence Paul
le 25 Jan 2024
0 votes
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);
Catégories
En savoir plus sur Hamming dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!