I have a cell array of size 1x84, where the elements are 1x1 or 1x2 cells.
I woluld like to get a cell array of size 1x84 by taking the first element from the nested cells
CellList = <1x84 cell>
CellList = <1x1 cell> <1x1 cell> <1x1 cell> <1x2 cell> <1x1 cell> ... <1x2 cell>
The subelements are also cells
I tried using this code:
CellList = cellfun(@(x)x{1,:}{1,:},CellList, 'UniformOutput',0);
But I faced the following error:
error : Cell contents reference from a non-cell array object.