Is the log() function faulty?

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.

 Respuesta aceptada

Stephen23
Stephen23 el 3 de Mayo de 2016
Editada: Stephen23 el 3 de Mayo de 2016

3 votos

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.

1 comentario

John D'Errico
John D'Errico el 3 de Mayo de 2016
Oh, wait. You mean the help is there for us to read? Just think - all this time I've wasted, wondering what stuff does.

Iniciar sesión para comentar.

Más respuestas (1)

CAS
CAS el 3 de Mayo de 2016

0 votos

Thank you very much for your help!!!:)

Categorías

Más información sobre Startup and Shutdown en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

CAS
el 3 de Mayo de 2016

Respondida:

CAS
el 3 de Mayo de 2016

Community Treasure Hunt

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

Start Hunting!

Translated by