Ask your own question, for FREE!
Mathematics 67 Online
OpenStudy (raffle_snaffle):

% MATLAB contains functions to calculate the natural logarithm (log), the % logarithm to the base 10 (log10), and the logarithm to the base 2 % (log2). However, if you want to find a logarithm to another base - for % example, base b - you'll have to do the math yourself with the formula logb(x) = loge(x)/loge(b)

OpenStudy (raffle_snaffle):

@phi

OpenStudy (phi):

what is the question?

OpenStudy (raffle_snaffle):

how do i find another logarithm to another base using the formula above?

OpenStudy (raffle_snaffle):

if you want to find a logarithm to another base - for % example, base b - you'll have to do the math yourself with the formula

OpenStudy (phi):

in Matlab, log(x) means ln(x) if you want base 2 (for example) you would do log(x)/log(2) we know (I hope) \(\log_2(4) = 2\) on the other hand log(4)/log(2) = 1.38629436111989/0.693147180559945= 2

OpenStudy (raffle_snaffle):

i am a little confused. If I want base 2 I need to do log(x)/log(2) ?

OpenStudy (phi):

yes

OpenStudy (phi):

you can test it on your calculator or in matlab

OpenStudy (phi):

Here is a function that does what you want % y = logb(x,b) % returns log_base_b(x) function y= logb(x,b) y= log(x)./log(b);

OpenStudy (raffle_snaffle):

Let me play around with this a bit in matlab. The comment before the last comment I see where you are going.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!