why does ln not work

31 views (last 30 days)
Jon Stapels
Jon Stapels on 3 Mar 2017
Edited: Geoff Hayes on 3 Mar 2017
Can not get the ln command to work in MATLAB;
>> ln(2) Undefined function or variable 'ln'.
What am I doing wrong?

Answers (1)

Geoff Hayes
Geoff Hayes on 3 Mar 2017
Edited: Geoff Hayes on 3 Mar 2017
Jon - use log for the natural logarithm.
>> log(2)
ln is not a built-in MATLAB function (or rather it is but for MuPAD - see MuPAD ln for details).

Community Treasure Hunt

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

Start Hunting!