How do I count how many NaN's in a data cell?
2 views (last 30 days)
Show older comments
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 Comments
Answers (1)
See Also
Categories
Find more on Numeric Types in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!