Binary String Generator With Minimum Distance
显示 更早的评论
How do I generate 20 strings of binary numbers each of which are a minimum distance of 3 from all of the other strings?
采纳的回答
更多回答(1 个)
Lawrence Paul
2024-1-25
0 个投票
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);
类别
在 帮助中心 和 File Exchange 中查找有关 Hamming 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!