Solving Exponential equation in MATLAB
I am now trying to solve an exponential equation in MATLAB as a part of my assignment. It is easy to see that the equation exp(-t)+t*exp(-t)-n=0 would have two solutions, one greater than zero and one smaller. However, using just the solve function, MATLAB returns something called lambertw function and it can only eval() to the solution below zero, which happens not to be the one I want for the answer. Could anyone help me here? Thanks in advance for all the answers and comments! p.s. As an alternative, I am thinking about using Newton-Raphson method to solve it, but I wonder how is the speed