w.matrix function

Weights Matrix based on a number of nearest neighbours or a fixed distance