MATLAB: Is the log() function faulty

log function

When I use the log function [log (x)] to log the value 616, I am getting the answer 6.4232. However, when I calculate it on windows excel or my calculator I get 2.789580712.
I'd like to know why I am getting a different answer on Matlab.

Best Answer

The documentation tells us that in MATLAB log calculates the natural logarithm, and log10 the base ten logarithm.
>> log(616)
ans = 6.4232
>> log10(616)
ans = 2.7896
The MATLAB help is great: it tells us how MATLAB works. You should try using it.