Find ordered nearest neighbors based on correlation, assuming the absolute value of the correlation is monotonically decreasing with distance. Returns an n X (m + 1) matrix, each row indicating the m + 1 nearest neighbors including itself.
Useful links