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
 Forum for Origin C
 Lorentzian Fitting using NLSF
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

basarir

USA
Posts

Posted - 11/08/2006 :  4:37:16 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Version (Select Help-->About Origin): Origin 7 SR4
Operating System: Win 98

Greetings,

I am pretty new to Origin C programming. I wrote a pretty simple script for Lorentzian fitting and I can extract the parameter values(Offset, Center, Width and Area) and std's very well, using nlsf.pn and nlsf.en respectively.
However, I can not get the result for the Height value.
Is there a way to retract that and its std from the NLSF?

Thank you

zachary_origin

China
Posts

Posted - 11/08/2006 :  9:14:54 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
For Height, you can use this function after you get the value of Center: double Data_table(double dX, Dataset* pdsYdata, Dataset* pdsXdata = NULL). In your case, the code will be something like this:

Dataset pdsYdata("Lorentzian_b"); // assume the second column of the workbook named Lorantzian is the Y dataset
Dataset pdsXdata("Lorentzian_a");// assume the first column of the workbook named Lorantzian is the X dataset
double dX = nlsf.p2;
double dPeakHeight = Data_table(dX, &pdsYdata, &pdsXdata);





Zachary
OriginLab Technical Services.


Edited by - zachary_origin on 11/08/2006 9:26:59 PM
Go to Top of Page

erica-cn

China
Posts

Posted - 11/08/2006 :  9:16:27 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Onur Basarir

To get the result for the height value, you can try to calculate from the Lorentzian function. as follows:


Any more information, please feel free to contact us.

Erica Shang
OriginLab Technical Service

Go to Top of Page

larry_lan

China
Posts

Posted - 11/08/2006 :  9:37:40 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
To calculate the error of H, you can use the following error propagation rule:


Larry
OriginLab Technical Services
Go to Top of Page

basarir

USA
Posts

Posted - 11/09/2006 :  10:14:05 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks a lot for your fast replies Zachary, Erica and Larry

These were what I was looking for.

Onur
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