I am working with a data set containing lots of NaNs (note the attached file). I know that I can easily remove complete rows or columns containing NaN elements:
dat=dlmread('scatteredNans.dat');dat(isnan(sum(dat,2)),:)=[];
However the NaNs are scattered, so almost every row and column is containing at least one NaN element. Removing those rows and columns will leave no data to work with. Replacing the NaN elements with a constant value (like zero) is also not possible as it will add to much distortion.
Best Answer