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 for Programming
 LabTalk Forum
 Subrange not work in nlfit

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
tantiger Posted - 04/25/2022 : 11:08:40 PM
Origin Ver. and Service Release (Select Help-->About Origin): OriginPro 2021b (64-bit) SR2 9.8.5.212 (Academic)
Operating System: Windows 11 Home

Hi,

I am trying to use LabTalk to do a non-linear fitting (3 peaks with Lorentz fitting). If I don't specify range, the script can give results as expected:

nlbegin iy:=(1,2) func:=lorentz replica:=2 nltree:=ParamTree;
ParamTree.xc = 351;
ParamTree.xc__2 = 356;
ParamTree.xc__3 = 417.5;
nlfit;
...

However, if I add the range, then the script just does not work as the cod value of fitting is 0.

nlbegin iy:=(1,2)[99:161] func:=lorentz replica:=2 nltree:=ParamTree;
ParamTree.xc = 351;
ParamTree.xc__2 = 356;
ParamTree.xc__3 = 417.5;
nlfit;
...

Need some help here. Thanks :D

3   L A T E S T    R E P L I E S    (Newest First)
tantiger Posted - 04/28/2022 : 10:03:15 PM
Yes, and that's why I would like to use labtalk to ease the work. But strangely, the same range won't work in labtalk.
YimingChen Posted - 04/27/2022 : 3:25:49 PM
Have you tried running the fit on the same range in the NLFit dialog? can it succeed? Thanks.

James
tantiger Posted - 04/26/2022 : 10:06:48 PM
OK, I tried other ranges and found some work some cannot.

For example, I set the range to [99:171] then I can get fitting results.

Also tried on other datasets I have, some work with [99:161].

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