I have a cellarray with two columns and several rows. When I use
data = data(~cellfun('isempty', data))
It removes the empty cells and creates a cell array with both the previous two rows now in one row. I want them to still be in two rows. How could I do this?
To be clearer:
data{i, 1} = subdata_1
data{i, 2} = subdata_2
where subdata_1 and 2 are further cell arrays.
So the cell array data will contain two columns and several rows,
where each cell is another cell array. Some rows will be empty []
and when I remove these empty cells, data will no longer contain
two columns and several rows, but only 1 column. How can I keep the
N x 2 structure of the data cell array?