Even parity check code



Hello everybody!

I am a new user of MATLAB. Can anybody guide me how to do
even parity check code on matlab?

we have (8,7,2) that is n=8, k=7, d=2 2^7=codewords
if is a odd ex. 0101010 -> 01010101 (we have three one so in
the end is an extra 1)
or if is even ex. 0110110 --> 01101100 (we have four one so
in the end is an extra 0)

In my case we give to the matlab seven bits ex. [1011101]
and we expect the the output to be 8 bits ex. [10111011].

kindly suggest me how to do it!!!

Thanks in advance


.