MATLAB: How to delete entire row if any cell of the particular row is empty

statisticstoolbox

Hi, I have the below cell array matrix. Some cells are empty, and I want to delete entire row if any cell is empty(Ex: 2, 3,4). And my final output should be only row1 & row5.
Index name1 name2 visit
1 MM_vrx_ty_98u prb05k 20
2 M_rx_ty_8u prbkv
3 prb05k 50
4 MM_vrx_ty_98u 11
5 GG_VL_ty_4u 9
Kindly help. Sincerely,

Best Answer

row_has_empty = any(cellfun(@isempty, YourCell), 2); %find them
YourCell(row_has_empty,:) = []; %delete them