Logarithm with a variable base

10 Ansichten (letzte 30 Tage)
Chesus
Chesus am 2 Sep. 2023
Kommentiert: Voss am 2 Sep. 2023
I want to make a logarithm that has a variable as its base, like:
k=2
logk(8)
ans =
3
How can I do that?

Akzeptierte Antwort

Voss
Voss am 2 Sep. 2023
k=2
log(8)/log(k)

Weitere Antworten (0)

Kategorien

Mehr zu Exponents and Logarithms finden Sie in Help Center und File Exchange

Produkte


Version

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by