Here one way:
The given cell data
a={[1,2;3,4;5,6;7,8],[9,10;11,12],[13,14;15,16;17,18]}
Check data
a =
1×3 cell array
{4×2 double} {2×2 double} {3×2 double}
Get the rows ('1') of all cell elements, if columns, use '2'
cell_sizes=cellfun('size',a,1);
Get the max size of rows and 50% of the row size
max_size=max(cell_sizes);
th=max_size*0.5;
Apply the condtion for rows more than 50% of max size (Get the indices, those are lesser or equal)
idx=find(cell_sizes<=th);
Assign all cell elements with particular indices idx with blanks ([])
Remove all those are blanks cell elements
a(cellfun('isempty',a)) = []
Result:
a =
1×2 cell array
{4×2 double} {3×2 double}
Best Answer