Importing Excel-Spreadsheet with columns of NaN
2 ビュー (過去 30 日間)
古いコメントを表示
Hi,
I have a large dataset in an Excel-Spreadsheet which contains some columns with only NaN. The first row of the spreadsheet contains the column names (strings).
I would like to find the column names that are associated with NaN-columns. Is there a way to do this?
Thanks!
0 件のコメント
回答 (1 件)
nl2605
2014 年 3 月 12 日
Use xlsread. [num,txt,raw] = xlsread('filename.xlsx'); and then check with 'isnan' to get the corresponding column name.
2 件のコメント
nl2605
2014 年 3 月 12 日
Yea, I checked it now. It seems it reads it as text and not a number which is what NaN is all about. Why don't use strcmp then? and read the txt and num columns and check.
参考
カテゴリ
Help Center および File Exchange で Logical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!