gravity function

A function to calculate the matrix of gravity coupling based on distance and population size