I have an array of cells in MATLAB, say cell_arr , and it has null entries as well as entries in non-zeros cells. For example:
cell_arr = {0, 0, 0, 0, 0, {1x3 cell}, {1x3 cell}, {1x3 cell}, {1x3 cell}};
Can someone tell me how to remove these null entries from cell_arr or to find indices of non-null entries? In addition, I want to avoid the for loop to complete this task.
I have already tried the find function, however the find function is not applicable for cell arrays. I am wondering if there is one line expression / expression doing this job?
matlab cell-array
Sanchit
source share