MATLAB solutions of Lambert's problem

MATLAB functions and scripts for solving the geocentric and heliocentric Lambert problem.
5K Downloads
Updated 15 Sep 2025

View License

This submission contains five 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.
lambert1 - two-body Earth orbit solution
This MATLAB script demonstrates how to solve the two-body form of Lambert’s problem for a spacecraft in Earth orbit.
lambert2 - two-body interplanetary solution
This MATLAB script demonstrates how to solve the two-body interplanetary Lambert problem.
lambert3 – perturbed motion solution – shooting method with state transition matrix updates
lambert4_otb and lambert4_snopt – perturbed motion – NLP solution
These two MATLAB applications demonstrate how to solve the -perturbed Earth orbit Lambert problem using nonlinear programming (NLP). This script can solve both the flyby and rendezvous problems. For the flyby problem, the programs attempt to match all three components of the final position vector. For the rendezvous problem, the scripts attempt to match all three components of both the target or final position and velocity vectors.

Cite As

David Eagle (2025). MATLAB solutions of Lambert's problem (https://uk.mathworks.com/matlabcentral/fileexchange/39530-matlab-solutions-of-lambert-s-problem), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2024b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Gravitation, Cosmology & Astrophysics in Help Center and MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.3.0.0

Updated graphics and PDF documentation.

1.2.0.0

Updated PDF documentation and MATLAB source code.

1.1.0.0

Added main script (lambert4_64bit.m) that uses the March 17, 2014 version of SNOPT.

1.0.0.0