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
 nlfs script not working in 7.5

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
deanx Posted - 09/14/2004 : 11:52:07 AM
Origin Version : 7.5 sr4
Operating System: WinXP

I have a labtalk script which fits a gauss curve to all colums in a worksheet (spectra) then saves one parameter and the error to a second work sheet (output). The script is as follows:

for (test=2; test<=%(SPECTRA,@#); test++){
%A=SPECTRA!wks.col$(test).label$;
output_ps[test-1]="%A";
nlsf.begin();
nlsf.func$="gauss";
nlsf.setDepend(y,%(SPECTRA,test));
nlsf.x$="SPECTRA_A";
nlsf.constr$="";
nlsf.p1=4025;
nlsf.p2=429;
nlsf.p3=6.8;
nlsf.p4=40618;
nlsf.tolerance=0;
nlsf.fit(150);
output_peak[test-1]=nlsf.p2;
output_error[test-1]=nlsf.e2;
nlsf.end();
}

In V7 this woks perfectly in 7.5 it doesn't work at all. It appears as though the data is not been set in the nlsf object so the fit doesn't do anything or fits to the last manual fit that had been performed. So I would guess that the line

nlsf.setDepend(y,%(SPECTRA,test));

isn't doing what it used to. Either a solution or just a nicer way to do this would be good.

Thanks

2   L A T E S T    R E P L I E S    (Newest First)
deanx Posted - 09/15/2004 : 06:49:57 AM
Thanks Mike,

It all works again now.
Mike Buess Posted - 09/14/2004 : 12:46:17 PM
I would normally use this to set the dependent dataset (I assume the column number is test)...

%A=%(SPECTRA, @D, test);
nlsf.y1$=%A;
-or-
nlsf.fitdata1$=%A;

Works in all versions.

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 09/14/2004 12:51:09 PM

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