The Origin Forum
File Exchange
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
 Origin Forum
 Origin Lab Talk - data selection - NL fit
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Iveta_

United Kingdom
6 Posts

Posted - 09/20/2021 :  7:55:33 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. 9.8.6.212 and Service Release (Select Help-->About Origin):
Operating System: Windows 10

I'm learning LabTalk to automate my long analysis (started yesterday). I can't find a method/attribute that allows me to select the x data when fitting NL function directly from a graph. I am using a user made function. What I do is Data selection => Input data => Rows => By X => 15. Is there a suitable script that can be written for this?

Thanks!

snowli

USA
891 Posts

Posted - 09/21/2021 :  09:08:44 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hello,
Do you mean you want to fit a subrange of data defined by X start and end value.

In NLFit dialog, when u set by X and specify X From and to values, the input node shows the syntax to use if in script.

E.g. Suppose you are fitting with column B plot in graph1,
You can use the following input
[Graph1]1!1"B"[x10:20]; //x from 10 to 20
[Graph1]1!1"B"[10:20]; //index from 10 to 20. 10th point to 20th point. [Graph1]1!1"B"[x10:0]; //0 means end point


Thanks, Snow

Go to Top of Page

YimingChen

820 Posts

Posted - 09/21/2021 :  09:09:41 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Can you use the syntax below to specify the range by x value?
iy:=(1,2)[x1:10]


Please check this page for more details:
https://www.originlab.com/doc/labtalk/guide/range-notation#Specifying_Subrange_Using_X_Values

James
Go to Top of Page

Iveta_

United Kingdom
6 Posts

Posted - 09/21/2021 :  2:53:30 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
This worked in the end, thank you to both of you!

nlbegin iy:=1[x0:10] func:=my_model nltree:= tt;

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