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
 Inverse hyperbolic function
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Leon48

USA
Posts

Posted - 10/08/2005 :  11:36:11 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Version (Select Help-->About Origin): 6.1
Operating System: Windows XP

I am trying to do a non-linear curve fitting using a User-defined function:

y = a * arcsinh(b*x) + c

but I keep getting the error message: 1) Check your expepression(s) for syntax errors. 2) Make sure you are using the Y-script or Equation form.

I am not good at Y-script at all. I've used User-defined function before, such as:
y = acos(cos(d)-a*(1+cos(d))*tanh((b*x)^c))

Do I get the inverse hyperbolic function wrong? Thanks a lot!!!

Leon

Leo_Li

China
Posts

Posted - 10/09/2005 :  06:37:37 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hello Leon48,

It seems that origin has no build-in arcsinh(), but you can always use nag function instead. to do it:
1. check "use origin c", and your function is in the form of:

y = a * nag_arcsinh(b*x) + c;

2. click "edit in code builder" button, and in code builder, at top of the code, just below #include <origin.h>, add:

#include <OC_nag.h>

3. click "return to nlsf", now ready to go.

Leo

Go to Top of Page

Mike Buess

USA
3037 Posts

Posted - 10/09/2005 :  10:52:35 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Leon,

Unfortunately nag functions are not available in Origin 6.1. However, thumbing through my ancient Handbook of Mathematical Tables I found this relationship which might be useful...

arcsinh(x) = log(x + sqrt(1 + x^2))

...Before I forget where I found that, here are expressions for other inverse hyperbolic functions that are not built in to Origin.

arccosh(x) = log(x + sqrt(x^2 - 1))
arctanh(x) = (log(1 + x) - log(1 - x))/2

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 10/10/2005 08:50:13 AM
Go to Top of Page

Leon48

USA
Posts

Posted - 10/09/2005 :  4:06:38 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Mike and Leo:

Thank you very much for the prompt replies. It seems that Origin 7.5 is more powerful with nag functions. I was able to use Mikes idea to fit my data perfectly.

Thank again for valuable input from you guys.

Leon
10/9/05
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