i have to embed a text on watermark after applying hamming code on text.So in using a reshape function error "size arguments must be real integers" is coming.please help me out how can i remove this error?Wb=d​ouble(resh​ape(Wmsg,4​,(7/4)*vc)​.');

%converting text to binary bits
Wtxt=dec2bin('SBK,Gaya,BP-(120/80)');
Wtxtr=reshape(Wtxt',1,numel(Wtxt));
Wmsg=~isspace(regexprep(Wtxtr,'0',''));
IMS=size(Wmsg,2);
%%Hamming encoder algorithm and embedding
m=3;
n=2^m-1;
k=4;
vc=(IMS/7);
Wb=double(reshape(Wmsg,4,(7/4)*vc).');

Answers (1)

Your IMS/7 is not going to be exactly representable in binary, so when you multiply that by 7 again the result might not be exactly an integer. You should avoid division followed by remultiplication by the same value.

Categories

Asked:

on 21 Feb 2014

Answered:

on 21 Feb 2014

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!