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 for Programming
 LabTalk Forum
 nlbegin/nlfit/nlend
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

kemeyer

39 Posts

Posted - 07/15/2010 :  4:30:02 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin):8.1 SR1
Operating System:Vista

I have a question regarding the capabilities of the nlbegin/nlfit/nlend x-functions.

Basically, I have a dataset of index(n) vs wavelength(lambda) that I initially fit to the sellmeier equation:

n = sqrt(A + B*Lambda^2/(Lambda^2-C) +
D*Lambda^2/(Lambda^2-E))

Where n is the dependent variable and Lambda is the independent. I've created a user-defined function for it and was able to fit the data using the analysis>>Non-linear fit>>new dialog option from Origin's menus. After this fit, I get parameters A, B, C, D, and E.

What I want to do is use these parameters for the next step, which is finding the parameter alpha in the equation:

n = sqrt(A + B*Lambda^2/(Lambda^2-C)(1+alpha*(T-23)) +
D*Lambda^2/(Lambda^2-E)(1+alpha*(T-23)))

Where I have the data of Temperature (T) vs. index(n) at a given wavelength(lambda).I know they need to be fixed, but I am unsure of how to go about doing this. Should I assign nltree:= to the output of the first fitting? One problem I see is that in the second equation, Lambda is a constant (but a different one for each data set I am looking at). Here, the independent variable is T, the dependent is still n, and the parameter is alpha (A, B, C, D, E, and Lambda will all be fixed).

Do you have any suggestions or pertinent examples I could look at? I searched the wiki page for Origin but I didn't see anything that clarified or answered my questions.

I'd really appreciate any help you could give me,
Katie

VincentLiu

China
Posts

Posted - 07/16/2010 :  05:27:23 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
The following is an example to show you how to fix the parameter xc of the gauss function at 5.


nlbegin iy:=(1,2) func:=gauss nltree:=ParamTree;

ParamTree.xc = 5; // Assign an initial value 5 to xc
ParamTree.f_xc = 1; // Add the prefix "f_" before xc and assign 1 to "f_xc" to fix xc

nlfit;
nlend;


You can click here to get another example to show you how to fix parameters and then unfix them.

vincent
OriginLab Technical Services


Edited by - VincentLiu on 07/16/2010 05:28:43 AM
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