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!!!
Stephen23
Stephen23 2020 年 7 月 29 日
@KH: my pleasure. Please accept my answer if it helped you!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeData 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