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
 Integrating the Langevin formula

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
Labog Posted - 09/18/2013 : 12:00:39 PM
Origin Ver. and Service Release (Select Help-->About Origin):
Operating System:

Hi

I would like to fit some measured magnetisation data using an integral of the Langevin formula multiplied by log normal. I am new to writing functions to fit, so I wanted to try by just re-writing the Langevin formula but I can't even get this to work!

I want to use something of the form
M = Ms*((cosh(A*r*H)/sinh(A*r*H))-1/A*r*H)
where H is the dependent variable and r is varied to give the best fit to the data. I have defined Ms=4.8E5, A=6.1E20, r = 9e(-9). When I try to evaluate this in the function builder it doesn't give me a value, and when fitting it does not produce a fit that converges.

Please help!
1   L A T E S T    R E P L I E S    (Newest First)
Hideo Fujii Posted - 09/23/2013 : 12:33:34 PM
Hi Labog,

The definition itself seems correct. I don't know the range of H (which is, I guess, an independent variable, not dependent, and M is), but for example, when H=1e-50, your function returns 8.7431693989071E42 .

Sinh may easily overflow such that:
sinh(700)=5.071160273675E303
sinh(750)=--
using tanh might help to avoid overflowing.

Hope this helps.

--Hideo Fujii
OriginLab

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