fid = fopen ("NA.csv", "wt");
fdisp (fid, "1,NA,3");
fdisp (fid, "4,NaN,6");
fclose (fid);

data = dlmread ("NA.csv", ',')
