how to remove rows and columns in cell array ?

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

 채택된 답변

Stephen23
Stephen23 2020년 7월 29일
편집: Stephen23 2020년 7월 29일

1 개 추천

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

kH
kH 2020년 7월 29일
thank you Stephen!!!
@KH: my pleasure. Please accept my answer if it helped you!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Data Types에 대해 자세히 알아보기

태그

질문:

kH
2020년 7월 29일

댓글:

2020년 7월 29일

Community Treasure Hunt

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

Start Hunting!

Translated by