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!