How to remove empty cells from array
197 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hi,
I'm very new to matlab :)
How can I remove the empty cells from the array in the attached image?
I have tried data(~cellfun('isempty',data)), but this didn't work.
Thank you for the help.

4 Commenti
Stephen23
il 23 Ago 2021
@Daneisha Blair: yes,
data(cellfun(@isempty,data))=[];
is probably the best way to do this.
Risposte (1)
KSSV
il 23 Ago 2021
If C is your cell array, you can remove the empty cells using:
C = C(~cellfun('isempty',C)) ;
0 Commenti
Vedere anche
Categorie
Scopri di più su Surfaces, Volumes, and Polygons 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!