Matlab cody does not support lambertw. Try to create a lambert's w function yourself.

Lambert's W is the function that solves

x*exp(x) = A;

given the value of A.

Read more about Lambert's W here.

Though it is not particularly appropriate for this particular function, consider using Newton-Raphson's method. Since all test cases will converge if starting with 0.

The relative tolerance for the result of x*exp(x) compared to A is 1e-5.

Solution Stats

157 Solutions

52 Solvers

Last Solution submitted on Dec 07, 2025

Last 200 Solutions

Problem Comments

Solution Comments

Show comments
Loading...

Problem Recent Solvers52

Suggested Problems

More from this Author9

Community Treasure Hunt

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

Start Hunting!