MATLAB: I am Having Cell element 1X2, of 8 bit each i want it to make as individual element 1×16??

cell binary to binarycell element

d={'01111111' '10100110'}
I=cell2mat(d); % it will also return cell element 1X16 it returns I='0111111110100110'
% but I want it as binary value like this
I=[0 1 1 1 1 1 1 1 1 0 1 0 0 1 1 0]

Best Answer

Your variable d is a cell array of strings. Here is a simple trick to concatenate the cells ( using comma-separated list expansion [d{:}]), and then convert this to the requested numerical array by subtracting the character '0':
d={'01111111' '10100110'}
I = [d{:}] - '0'