In general, removing elements is the easy part. If C is your array, removing the cells indicated by the indices in the idx vector can be done with:
C(idx) = {};
As for your specific problem, checking if the matrix is βββalmostβ unique or not can be done using rcond (if the result is close to zero, it is probably singular). To apply it to all cells, you can use cellfun as follows:
idx = cellfun(@(x)(rcond(x' * x) < 1e-12), C);
Adjust the threshold value as you wish. The resulting idx is a logical array with 1 at the location of the singular matrices. Use idx to remove these elements from C , as shown above.
source share