OutputPort1=InputPort1;

n=15; %codeword length
k=5; %msg length
m=5; %symbol rate

%to convert binary input to decimal array
b=2.^(3:-1:0);
c1=InputPort1.Sequence(1:20);
y=reshape(c1,4,5);
msg=b*y;

%msg=[3 7 0 15 9; 11 8 2 1 6]; %msg is Galois field array

msg=msg(:); %msg as column vector
h=comm.RSEncoder(n,k);
code=step(h,msg);
final=reshape(code,1,15);

c=de2bi(final,'left-msb');
c=c';
code=reshape(c,1,60);
OutputPort1.Sequence=code;