Effacer les filtres
Effacer les filtres

how to remove rows and columns in cell array ?

8 vues (au cours des 30 derniers jours)
kH
kH le 29 Juil 2020
Commenté : Stephen23 le 29 Juil 2020
Example :
i 29317x10 cell array
Name DOB age .............................. .address
ramesh 1994 25 sbc
suresh 1994 25 sbc
ram 1994 25 sbc
.
.
.
.
.
.
.
.
[ ] [ ] [ ]...................................... [ ] %25419 row
[ ] [ ] [ ]...................................... [ ]
[ ] [ ] [ ]...................................... [ ]
.
.
.
.
.
[ ] [ ] [ ]...................................... [ ] %29317 row
i want to remove these emtpy remove rowm 25419 to 29317 and all column wrt that row

Réponse acceptée

Stephen23
Stephen23 le 29 Juil 2020
Modifié(e) : Stephen23 le 29 Juil 2020
Where C is your cell array:
C(25419:29317,:) = [];
You could also detect those rows automatically:
X = all(cellfun(@isempty,C),2);
C(X,:) = []
  2 commentaires
kH
kH le 29 Juil 2020
thank you Stephen!!!
Stephen23
Stephen23 le 29 Juil 2020
@KH: my pleasure. Please accept my answer if it helped you!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Structures dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by