MATLAB 24.1.0.2603908 (R2024a) Update 3
mod(G*H',2) =
     0     0     0
     0     0     0
     0     0     0
     0     0     0

    Message      Codeword      Weight
    ________    ___________    ______

    {'0000'}    {'0000000'}      0   
    {'0001'}    {'0001011'}      3   
    {'0010'}    {'0010110'}      3   
    {'0011'}    {'0011101'}      4   
    {'0100'}    {'0100111'}      4   
    {'0101'}    {'0101100'}      3   
    {'0110'}    {'0110001'}      3   
    {'0111'}    {'0111010'}      4   
    {'1000'}    {'1000101'}      3   
    {'1001'}    {'1001110'}      4   
    {'1010'}    {'1010011'}      4   
    {'1011'}    {'1011000'}      3   
    {'1100'}    {'1100010'}      3   
    {'1101'}    {'1101001'}      4   
    {'1110'}    {'1110100'}      4   
    {'1111'}    {'1111111'}      7   

Message blocks:
     0     1     0     0
     0     0     0     0
     0     1     0     0
     0     0     0     0
     0     1     0     0
     0     0     0     0
     0     1     0     0
     0     0     0     0
     0     1     0     0
     0     0     0     0
     0     1     0     0
     0     0     0     0
     0     1     1     1
     1     1     1     0
     0     0     0     0
     0     0     0     0

Encoded blocks:
     0     1     0     0     1     1     1
     0     0     0     0     0     0     0
     0     1     0     0     1     1     1
     0     0     0     0     0     0     0
     0     1     0     0     1     1     1
     0     0     0     0     0     0     0
     0     1     0     0     1     1     1
     0     0     0     0     0     0     0
     0     1     0     0     1     1     1
     0     0     0     0     0     0     0
     0     1     0     0     1     1     1
     0     0     0     0     0     0     0
     0     1     1     1     0     1     0
     1     1     1     0     1     0     0
     0     0     0     0     0     0     0
     0     0     0     0     0     0     0

    Block    TrueErrorPosition    DetectedPosition     Syndrome  
    _____    _________________    ________________    ___________

      1              6                   6            0    1    0
      2              1                   1            1    0    1
      3              3                   3            1    1    0
      4              5                   5            1    0    0
      5              1                   1            1    0    1
      6              3                   3            1    1    0
      7              3                   3            1    1    0
      8              2                   2            1    1    1
      9              4                   4            0    1    1
     10              6                   6            0    1    0
     11              7                   7            0    0    1
     12              2                   2            1    1    1
     13              4                   4            0    1    1
     14              2                   2            1    1    1
     15              6                   6            0    1    0
     16              3                   3            1    1    0

Student seed: 1028
Inserted codeword errors: 16
Parity-bit errors: 5
Message-bit errors before correction: 11
Message-bit errors after correction: 0
    ErrorVector    Syndrome    IndicatedPosition
    ___________    ________    _________________

    {'0000000'}    {'000'}             0        
    {'1000000'}    {'101'}             1        
    {'0100000'}    {'111'}             2        
    {'0010000'}    {'110'}             3        
    {'0001000'}    {'011'}             4        
    {'0000100'}    {'100'}             5        
    {'0000010'}    {'010'}             6        
    {'0000001'}    {'001'}             7        

Transmitted codeword:
     0     1     0     0     1     1     1

Received word:
   1   1   0   0   1   0   1

Syndrome:
     1     1     1

Indicated single-error position:
     2

Codeword after the decoder flips the indicated bit:
     1     0     0     0     1     0     1

Decoded message:
     1     0     0     0

    ChannelErrorProbability    UncodedBER    CodedBER 
    _______________________    __________    _________

             0.005             0.0048675     0.0002725
              0.01             0.0099175     0.0009375
              0.02               0.01984     0.0033425
              0.05              0.049647      0.019148
              0.08               0.07962      0.045265
               0.1              0.099735      0.065772
              0.15               0.14935       0.12857
               0.2               0.20025       0.19529

Checks passed. Figures and results saved.
