given real number and $$r_{ij}=\sqrt{(x_i-x_j)^2+(y_i-y_j)^2+(z_i-z_j)^2}$$ I have been that this integral cannot be calculated analytically and one way for the numerical calculation is to use Monte Carlo methods, but I don't know how to implement this in MATLAB. integral numerical-methods definite-integral share | improve this question edited Jun 27 at 11:54 Asaf