how to remove rows and columns in cell array ?

4 Ansichten (letzte 30 Tage)
kH
kH am 29 Jul. 2020
Kommentiert: Stephen23 am 29 Jul. 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

Akzeptierte Antwort

Stephen23
Stephen23 am 29 Jul. 2020
Bearbeitet: Stephen23 am 29 Jul. 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 Kommentare
kH
kH am 29 Jul. 2020
thank you Stephen!!!
Stephen23
Stephen23 am 29 Jul. 2020
@KH: my pleasure. Please accept my answer if it helped you!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Creating and Concatenating Matrices finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by