WANTING to cluster your data is fine, but nothing says that you can always get what you want. We all want lots of things, many of which may be impossible to achieve. The clustering tools in MATLAB do not allow for missing data. Sorry. You could try to write your own tool that does do so. Or you might try to find one. I don't know of any.
So just exclude any data points that are missing, and cluster those that remain.
I might point out the help for kmeans (at least in the current version) says:
"kmeans treats NaNs as missing data, and ignores any rows of X that contain NaNs."
Since you are using an older release, I cannot know if that capability is in your release or not. Regardless, it is trivial to drop those points, which is all that kmeans would do anyway. There simply is no good way to cluster a point that has missing values.
Best Answer