MATLAB: How to convert a binary code to image

binary

I want to convert binary code like 0 1 1 0 1 0 1 0 1 1
to a binary image. Can it be done? please help?

Best Answer

b = [0 1 1 0 1 0 1 0 1 1];
image(logical(b));
colormap(gray(2))
Related Question