Search code examples
matlabequation-solving

How to solve n*log2(n)=A in matlab?


n*log2(n) = A, with A a known value. How do I solve for n in Matlab? Note that n isn't necessary an integer.


Solution

  • Or solve the equation analytically and use that:

    n = A*log(2)/lambertw(A*log(2))