Logarithm to base 10
MuPAD® notebooks are not recommended. Use MATLAB® live scripts instead.
MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.
log10(x
)
log10(x)
represents the logarithm of x
to
the base 10.
Mathematically, log10(x)
is equivalent to log(10,
x)
. See Example 1.
The logarithm to the base 10 is defined for all complex arguments x ≠ 0.
log10(x)
rewrites logarithms to the base
10 in terms of the natural logarithm: log10(x) = ln(x)/ln(10)
.
See Example 2.
See the ln
help
page for details.
When called with a floatingpoint argument, this function is
sensitive to the environment variable DIGITS
which determines
the numerical working precision.
Compute these logarithms using log10
:
log10(10), log10(1000), log10(1)
Compute the same logarithms using log
with 10 as the first argument:
log(10, 10), log(10, 1000), log(10, 1)
log10
rewrites logarithms in terms of ln
:
log10(x), log10(x^2  1)
For floatingpoint values, log10
returns
floatingpoint results:
log10(123.4), log10(5.6 + 7.8*I), log10(15.45)
For floatingpoint intervals, log10
returns
results as floatingpoint intervals:
log10(2.0...10.15)

Arithmetical expression
x