How to import blanks cells as Nans
17 次查看(过去 30 天)
显示 更早的评论
I have a file (created in excel) with >100k rows and 22 columns. Many of the cells are blanks (not zeros). If I use csvread to import the data Matlab changes the banks to zeros. I cannot first change the blanks to 99999 because excel crashes. Is there a way to make Matlab import the blanks as Nan's?
0 个评论
采纳的回答
Mohammad Abouali
2015-4-27
a=importdata('sampledata.csv')
a =
1 2 3 4 5
1 2 3 NaN 5
1 NaN 3 4 5
1 2 3 NaN 5
1 2 3 4 5
1 2 3 4 NaN
3 个评论
Ahmed Nirjhar Alam
2020-7-23
Is there any equivalent substitute for when I have a file with multiple datatypes(such as integers, doubles, strings) in different columns?
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Spreadsheets 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!