필터 지우기
필터 지우기

how to remove rows and columns in cell array ?

조회 수: 13 (최근 30일)
kH
kH 2020년 7월 29일
댓글: Stephen23 2020년 7월 29일
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일
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!!!
Stephen23
Stephen23 2020년 7월 29일
@KH: my pleasure. Please accept my answer if it helped you!

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Structures에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by