Of course the data we collect is always perfect - NOT! Maybe yours is different. What can go wrong? So many things. Instruments drift, web sites go down, power goes out, ... So what can you do if you have gaps in your data, and the analysis you want to perform won't tolerate that condition? You might decide you need to fill in missing values.
We've been working on supplying functionality that makes dealing with missing data easier for a long time, starting with the introduction of NaN values right in the beginning. In a floating point array, NaNs act as placeholders. That's great, but what can you do from there?
Some functions, or variants of them, work differently your array contains any NaN values, e.g., mean.
We first helped you figure out if you have missing values. And later added the ability to fill and remove missing values. More recently, we added the ability to mark missing values, even if you don't know the datatype of the array. This makes it easier to supply NaN, NaT (not a time) values, and similarly for categorical and string arrays, without needing to know which one is appropriate - as may happen with different columns in a table.
Do you use the functionality to deal with missing values? If so, tell us how. If not, please tell us what is missing!
You can let us know here.
Get the MATLAB code
Published with MATLAB® R2018b
To leave a comment, please click here to sign in to your MathWorks Account or create a new one.