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
 All Forums
 Origin Forum
 Origin Forum
 User Defined Curve Fit

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
Orson1981 Posted - 06/24/2009 : 12:18:56 PM
Origin Ver. and Service Release (Select Help-->About Origin): OriginPro 8 SR0
Operating System: Windows Vista

I am trying to curve fit my data to the Langevin function of the form y = a[coth(b*x) - 1 / (b*x)]
where a and b are fitting parameters.

Everything I've tried to write a user defined curve fitting function has ended with utter failure, I'm at a complete loss as to how to get user defined functions working, let alone how write this particular function.
Any and all advise would be much appreciated.

Thanks.
1   L A T E S T    R E P L I E S    (Newest First)
easwar Posted - 06/24/2009 : 5:45:47 PM
Hi,

The coth() function is not available in Origin C (or in LabTalk), but you can define your function as below (by following how we defined it in the built-in Langevin function shipped with Origin)


double z = b * x;
double cothz = cosh(z)/sinh(z);
y = a * ( cothz - 1/z );


Let us know if that does not work.

Easwar
OriginLab

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000