How to replace NaN in tables?

2 ビュー (過去 30 日間)
Hao Tang
Hao Tang 2018 年 2 月 21 日
回答済み: Peter Perkins 2018 年 2 月 22 日
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?

回答 (1 件)

Peter Perkins
Peter Perkins 2018 年 2 月 22 日
You should look at ismissing, fillmissing, rmmissing, and at the various options in readtable and detectimportoptions.

カテゴリ

Help Center および File ExchangeTables についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by