PDF document and four MATLAB scripts that demonstrate how to solve the Earth orbit, interplanetary, and J2-perturbed form of Lambert’s problem. Lambert’s problem is concerned with the determination of an orbit that passes between two positions within a specified time-of-flight. This classic astrodynamic problem is also known as the orbital two-point boundary value problem (TPBVP) or the flyby and rendezvous problems.
Youl find the algorithms for orb2eci algorithm and source code at the R.H Gooding paper
Can you give some references for the algorithm you have programmed in orb2eci file?
Added main script (lambert4_64bit.m) that uses the March 17, 2014 version of SNOPT.