fixed lambda part of code

Fixed part of code which generates coefficient of interaction between
internal and external particles. Tested and compared with matlab code.