Remove missing from cell array
12 ビュー (過去 30 日間)
古いコメントを表示
I have used readcell to read tabular data.
How can the missing elements be removed?
6×1 cell array
{'a' }
{'b' }
{'c' }
{'d' }
{1×1 missing}
{1×1 missing}
2 件のコメント
回答 (1 件)
madhan ravi
2019 年 5 月 30 日
yourcell(cellfun(@ischar,C))
3 件のコメント
Andreas Martin
2020 年 7 月 14 日
Yes, in that case it doesn't work. Try then this instead:
C( cellfun( @(c) isa(c,'missing'), C ) ) = {[]};
参考
カテゴリ
Help Center および File Exchange で Cell Arrays についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!