I have a cell array in MATLAB, lets say cell_arr and it has zero entries as well as non-zeros cell entries. For example:
cell_arr = {0, 0, 0, 0, 0, {1x3 cell}, {1x3 cell}, {1x3 cell}, {1x3 cell}};
Can somebody please tell how to remove these zero entries from the cell_arr or, to find the indices of non-zero entries? Additionally, I want to avoid for loop for performing this job.
I already tried find function, however, find function is not applicable for cell arrays. I am wondering if there exists a single line statement/expression doing this job?