How to replace NaN in tables?

2 Ansichten (letzte 30 Tage)
Hao Tang
Hao Tang am 21 Feb. 2018
Beantwortet: Peter Perkins am 22 Feb. 2018
So I have a large table with lots of NaNs when importing it from a text file. Is there any way to leave those cells blank when initially importing or delete the NaNs after importing? I've tried
HabExEnglishPropCopy(~any(~isnan(HabExEnglishPropCopy), :),:)=[];
but the errors say either "any" is not a defined variable or that isnan is not valid for "table" arguments. Any help?

Antworten (1)

Peter Perkins
Peter Perkins am 22 Feb. 2018
You should look at ismissing, fillmissing, rmmissing, and at the various options in readtable and detectimportoptions.

Kategorien

Mehr zu Tables finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by