Introduction - If you have any usage issues, please Google them yourself
decoder of Hamming
Use a [7,4] Hamming code.
m = 3 n = 2^m-1 k = n-m
parmat = hammgen(m) Produce parity-check matrix.
trt = syndtable(parmat) Produce decoding table.
recd = [1 0 0 1 1 1 1] Suppose this is the received vector.
syndrome = rem(recd* parmat ,2)
syndrome_de = bi2de(syndrome, left-msb ) Convert to decimal.