Here\'s matlab\'s answer:
x=[1,0,1,1] x_encode=encode(x,7,4) >>x_encode [1,0,0,1,0,1,1]
I calculated the hamming code from definition