T O P I C R E V I E W |
Leon48 |
Posted - 10/08/2005 : 11:36:11 PM 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
|
3 L A T E S T R E P L I E S (Newest First) |
Leon48 |
Posted - 10/09/2005 : 4:06:38 PM 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 Mike¡¯s idea to fit my data perfectly.
Thank again for valuable input from you guys.
Leon 10/9/05 |
Mike Buess |
Posted - 10/09/2005 : 10:52:35 AM 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 |
Leo_Li |
Posted - 10/09/2005 : 06:37:37 AM 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
|