I want to use the correlation distance in knnsearch in Matlab. I'm wondering why for the correlation, "'correlation' — One minus the sample linear correlation between observations (treated as sequences of values)." is used. With knnsearch I want to find the k nearest neighbors. But isn't a perfect correlation (which would mean the closest match) be the correlation and not 1-correlation?