log to the base x

Jun 10, 2009 at 12:20pm

log to the base x

how to i do log to the base x in max?

#44321
Jun 10, 2009 at 1:28pm
jimdrake wrote on Wed, 10 June 2009 14:20
how to i do log to the base x in max?

have you tried typing “log” into an object box yet?

#159396
Jun 10, 2009 at 1:31pm

newobj: log: No such object
#159397
Jun 10, 2009 at 1:48pm

Look at the [expr] object and reference. There’s a log10 function and a log (natural log) function. The syntax is standard C, so any C reference will point you in the right direction if you can’t figure it out by trial and error.

#159398
Jun 10, 2009 at 2:09pm

i hunted around and i can’t see anything in C that lets you do log to the base x.

i did however dig out a text book from uni (!) and found this useful rule:

logA(x) = logB(x) / logB (a)

[capitals are meant to be subscript]

so, i can do it in [expr] with log to the base 10

#159399
Jun 10, 2009 at 3:11pm
jimdrake wrote on Wed, 10 June 2009 16:09
i hunted around and i can’t see anything in C that lets you do log to the base x.

i did however dig out a text book from uni (!) and found this useful rule:

logA(x) = logB(x) / logB (a)

[capitals are meant to be subscript]

so, i can do it in [expr] with log to the base 10

[expr log(($f1)*($f2-1)+1)/log($f2)]

this is for a range of 0. 1.

for other ranges just scale before and after.

frustrating, that expierience when typing “log” into an
object box, isnt it?

-110

#159400
Jun 10, 2009 at 3:18pm

…and if you want to include the input range into the
formula, you might end up with something like this:

[expr ((log((($f1-$f2)/($f3-$f2))*($f4-1)+1)/log($f4))*($f3-$f2))+$f2]

where $f2 $f3 are range low range high, and $f4 is the base.

#159401

You must be logged in to reply to this topic.