MATLAB: Displaying binary data in a uitable

binaryuitable

How do I show the binary values in a uitable. This was my attempt:
IM=getimage(handles.axes4); %Image data in 16 bit format
data=dec2bin(IM); %get binary representation
%Add all data to uitable
set(handles.uitableResults,'data',[])
columnname={'Binary'};
set(handles.uitableResults,'columnname',columnname);
set(handles.uitableResults,'data',{(data})

Best Answer

I assume, the image is 2D? Then what should appear in the table per cell? The single bits or the strings representing the bits? Can you post an example created manually?
Try this:
set(handles.uitableResults, 'data', cellstr(data))