The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 logarithms in base 2
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

coll@inia.

Spain
125 Posts

Posted - 05/21/2013 :  05:07:01 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin 8.5.
Operating System: Win7

I try to convert some column of numbers to their corresponding logarithm in base 2 and I was surprised to find no way to do it!

I googled through and was not capable of finding anything on the subject nor in the help.

Finally I did it in excel!!!.

Is there any way to make any base log calculation in origin?

Thanks, julio

greg

USA
1378 Posts

Posted - 05/21/2013 :  09:51:18 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
You can calculate the log in any base by dividing any 'log' of the number by that 'log' of the base, so:

ans1 = log(32) / log(2);
ans2 = ln(32) / ln(2);
ty Using log : $(ans1), ln : $(ans2);

which results in:
Using log : 5, ln : 5

which is correct since 2^5 = 32.

Go to Top of Page

coll@inia.

Spain
125 Posts

Posted - 05/28/2013 :  05:37:19 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank you greg for your effort!
However I do not understand anything of what you said!

I have a list of numbers, which are those in your formulas?
could you explain step by step what are you doing and why?
what does "ty" means?
Why do you need ln?

Thank you, julio
Go to Top of Page

snowli

USA
1379 Posts

Posted - 05/28/2013 :  09:19:58 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hello,

As Greg said we don't have log2 function in Origin.

But we have log() which is 10 based or ln() which is e based.

You can easily use log() or ln() to get log2() values.

E.g. if you want to calculate log2 of col(A), you can do open Set Column Values dialog of column A. Then enter fomula as follows:
log(col(A))/log(2)

or
ln(col(A))/ln(2)


Thanks, Snow Li
OriginLab Corp.
Go to Top of Page

coll@inia.

Spain
125 Posts

Posted - 05/29/2013 :  08:33:36 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank you Snow Li!

It is a little bit complicated compared to excel but..... it works !!

"My mathematics" are in the deepest of times, so I have to figure out why it works !

Thank you again, julio
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000