Remove missing from cell array
12 views (last 30 days)
Show older comments
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 Comments
Answers (1)
madhan ravi
on 30 May 2019
yourcell(cellfun(@ischar,C))
3 Comments
Andreas Martin
on 14 Jul 2020
Yes, in that case it doesn't work. Try then this instead:
C( cellfun( @(c) isa(c,'missing'), C ) ) = {[]};
See Also
Categories
Find more on Cell Arrays in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!