Efficiently use matlab to calculate diffusion coefficients en masse