MATLAB: How to append the number to get a matrix 8 X 8 in matlab

image processing

this is my code bb1,bb2,bb3,bb4 are 8 bits binary numbers like 0111101 dec2bin=decimal to binary conversion bin2dec=binary to decimal conversion
for k=1:4
for l=1:4
M=dec2bin(I(k,l));
f=mod(l,4);
for i=5:8
switch f
case isequal(f,1)
M(i)=bb1(i)
abc=bin2dec(M);
case isequal(f,2)
M(i)=bb2(i);
abc=bin2dec(M);
case isequal(f,3)
M(i)=bb3(i);
abc=bin2dec(M);
case isequal(f,0)
M(i)=bb4(i);
abc=bin2dec(M);
end
end
end
end
want to make a matrix of 8X8 by the abc values found. That is to append all abc. but dont know how to do it using matlab

Best Answer

I don't really follow what you're doing, but if you want abc to be an 8 by 8 matrix, you need to index it, like abc8x8(index1,index2) = abc or bin2dec(M) or whatever...