How to delete rows that contain NaN in a table
Show older comments
Hello all,
So how do you delete all the rows that contain NaNs in a table (not a matrix or a cell array)? I have tried various versions of
tableA(~any(~isnan(tableA), 2),:)=[];
but none work.
Thank you
1 Comment
Image Analyst
on 3 Feb 2017
Make it easy for us to help you by suppling code to generate a table with nans in it. Then I can try some things. And do any of your columns contain anything other than numbers? Like strings or something?
Accepted Answer
More Answers (1)
Peter Perkins
on 6 Feb 2017
4 votes
Categories
Find more on Tables 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!