I have a 2000*4 cell array. The 4th column is an ascending numeric values from 0 to 30. I do not know how many rows have 0 value in 4th column, and I would like to delete those rows from cell array. I wrote the following code with the loop, which works well. But is there any efficient way to avoid the for-loop?
[m,n]=size(A);count = 0;for i=1:m if isequal(A{i,4},0) count = count+1; endendA = A(count+1:m,:)
Thank you in advance
Best Answer