how to remove rows and columns in cell array ?

4 visualizaciones (últimos 30 días)
kH
kH el 29 de Jul. de 2020
Comentada: Stephen23 el 29 de Jul. de 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

Respuesta aceptada

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

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Creating and Concatenating Matrices en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by