Delete rows from cell array
4 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
David du Preez
il 1 Lug 2016
Commentato: David du Preez
il 1 Lug 2016
I have a cell array of 11x8761 and I want to delete entire rows when the value in column 9 or 6 are equal to []. How do I delete the rows without deleting the entire column as well?
0 Commenti
Risposta accettata
Guillaume
il 1 Lug 2016
emptycells = cellfun(@isempty, yourcellarray); %find empty cells in the whole cell array
yourcellarray(any(emptycells(:, [6 9]), 2), :) = []; %remove rows for which any of column 6 or 9 is empty
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Cell Arrays in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!