Log of 10 base "b" where 'b' is defined as 1 to 10 in increments of 1
10 views (last 30 days)
Show older comments
the question is simple, but i cannot figure it out in the book that they gave me, simple states how that there is log, log10 and log2, but doesnt really tell you how to change log base. Please show me the short code on how to solve this problem. It is for school BTW, and all i know is Log(base'b')(X)=log(base'e')(x) over log(base'b'(b) where be is all values between 1-10.
0 Comments
Answers (1)
Wayne King
on 29 Oct 2012
Edited: Wayne King
on 29 Oct 2012
Well it seems you have it above:
log2(8)
is just
log(8)/log(2)
So you can get the log to an arbitrary base, b, log_b(x), by log(x)/log(b)
However, I think you are going to have an issue with log to the base 1...
Think about what would happen in the denominator above when you try to divide by log(1)
0 Comments
See Also
Categories
Find more on Data Logging in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!