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
 Fitting of Dataset to Exp. Decay
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

boomerang

Germany
3 Posts

Posted - 11/20/2012 :  09:42:40 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Version: Origin 7.5G Pro RS 3
Operating System: Windows 7

Hey,
I would like to fit my data in a worksheet with a monoexponential decay (the x-axis data is always the same and there are different y-axis columns). All datasets should be fitted monoexponetially and I would like to save the fitting parameters in a different worksheet.

So far, I know that the command "run.section(fit, expdecay1)" will give the fitting. But I don't know how to pick the column for fitting and save the parameters. Someone could help me?

P.S: I'm pretty new to Laptalk programming, so please keep it simple.

Thank's for helping!

greg

USA
1378 Posts

Posted - 11/20/2012 :  11:39:58 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
You have to make the data worksheet active with something like:
window -a Data1;

You can select a column for fitting:
worksheet -s 2 0 2 0; // This select all of column 2

Assuming you have already created a three column worksheet named Results and you are using a variable named iRow to keep track of added results, run this script immediately after each fit:
%(Result,1,iRow)=P1;
%(Result,2,iRow)=P2;
%(Result,3,iRow)=P3;
iRow++;

Go to Top of Page

boomerang

Germany
3 Posts

Posted - 11/21/2012 :  04:25:06 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Your script is just working fine, greg! Thanks a lot!

One more question: Is it also possible to print the errors of the fitting parameters in that worksheet as well?
Go to Top of Page

greg

USA
1378 Posts

Posted - 11/21/2012 :  10:47:45 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Use PE1, PE2 and PE3 to get the errors of the parameters.
Go to Top of Page

boomerang

Germany
3 Posts

Posted - 11/22/2012 :  03:21:18 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
OK, now I know how to handle the data.

Thank you one more time!
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