参考:https://www.cnblogs.com/yhm138/articles/14856610.html
n=7;k=4; %汉明码的参数
msg=randi([0,1],1000,1); %信息序列
code=encode(msg,n,k,'hamming/binary'); %编码
参考:https://www.cnblogs.com/yhm138/articles/14856610.html
n=7;k=4; %汉明码的参数
msg=randi([0,1],1000,1); %信息序列
code=encode(msg,n,k,'hamming/binary'); %编码