MATLAB: How to convert each row in a cell array to a (1*n ) double matrix

cellcell arraycell arraysmatrix

Hello,
I have the attached cell array of size (164*102) where each cell is either contains 4-bits binary string or nothing (empty). How can I convert each row in the cell array to a seperate double matrix where each bit in the 4-bits string in a cell and the empty cell deleted.
For example,
if in Key array matrix we have the following row:
['0011', [ ], '1010', [ ], [ ], [ ], '0000', '1111']
then we convert it a seperate 1*16 double matrix:
[0,0,1,1,1,0,1,0,0,0,0,0,1,1,1,1].
Regrads,

Best Answer

a=cell(1,164);
for j=1:164
a{j}=[Key{j,1:end}]-48;
end