How do I count how many NaN's in a data cell?
2 次查看(过去 30 天)
显示 更早的评论
I was given a csv file by my teacher to download and i read it using this code below:
clear;
fclose all;
fileID = fopen('accidents_2017.csv');
text1 = textscan(fileID,'%s%s%s%s%s%s%d%d%s%d%d%d%d%f%f','HeaderLines',1,'Delimiter',{','},'EmptyValue',NaN);
fclose(fileID);
I tried using the function isnan(text1) but it tells me "Undefined function 'isnan' for input arguments of type 'cell'. " Is there a different function I should be using>
0 个评论
回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Numeric Types 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!