Problem 155. All your base are belong to us
Find the base b logarithm of the input decimal number x. Express the output as a decimal number. The first argument is the number x, and the second argument is the base b.
Examples
logb(1024,2) ---> 10
logb(25,5) ---> 2
logb(100000,10) ---> 5
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers529
Suggested Problems
-
Sum all integers from 1 to 2^n
14461 Solvers
-
Project Euler: Problem 8, Find largest product in a large string of numbers
1037 Solvers
-
867 Solvers
-
Get the length of a given vector
10270 Solvers
-
Back to basics - mean of corner elements of a matrix
398 Solvers
More from this Author23
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!