"Timothy Koh" <timothy_koh87@hotmail.com> wrote in message news:kh7iap$di3$1@newscl01ah.mathworks.com...> hi>> i am facing some problem encoding a 480x640 image with commBCHEncoder.> i manage to convert the image into matrix using imread where i will get > <480x640x3 unit8>.> Next i use B=(A(:,:,1)); where A is my image is matrix.> C=reshape(B,[],1);> D=dec2bin(C);