a=imread('f.jpg')
b=imresize(a,[16 16]);
c=dec2bin(b,8);
d=cellstr(dec2bin(b,8))';
ro=size(d,1);
co=size(d,2);
for i=1:ro
for j=1:co
p(i,j)=d(i,j);
end
end
for i=1:ro
for j=1:co
if d(i,j)==00000001 | 10000000
p(i,j)=00000001;
else
p(i,j)=10000000;
end
end
end
Undefined function 'eq' for input arguments of type 'cell'.