Author |
Topic  |
|
MicheleFerrari
Germany
Posts |
Posted - 11/15/2005 : 11:33:42 AM
|
I perform a labtalk script for nonlinear curve fitting with a user defined function (*.fdf) using data in different worksheets. After one fitting session, when I want to start next session with a new worksheet, I am always asked to save or discard my function ("Attention: ... modified functions have not been saved...") Is there a way to skip this message or to automate the saving via script, since I want to run the script over multiple worksheets?
Thanks in Advance.
Origin Version (Select Help-->About Origin): 7.5 SR5 Operating System: Win2000 |
|
Mike Buess
USA
3037 Posts |
Posted - 11/15/2005 : 4:22:25 PM
|
You can try inserting nlsf.msgPrompt=0 in your script but I'm not sure where without seeing the script itself. I don't think I've ever seen that prompt in a scripted fitting session so it might help to post your script.
Mike Buess Origin WebRing Member |
 |
|
MicheleFerrari
Germany
Posts |
Posted - 11/16/2005 : 04:01:36 AM
|
I have already used nlsf.msgPrompt=0. So here's my script:
%L=joscrss; //worksheet RSScount=1; //first row for the results pinit=79.60491; //initiale Leistung anzpts=19; //number of rows using NLSF = LabTalk.NLSF; nlsf.init(); nlsf.msgprompt=0; nlsf.begin(); nlsf.func$="busso"; // select fitting function (user defined) nlsf.cleanupfitdata(); nlsf.fitData$="%L_pemp"; //col with data to fit nlsf.compileparainit=[0];
for (i=1;i<=90;i++) //iterate tfit { for (j=1;j<=90;j++) //iterate tfat { nlsf.x1$="%L_t$(i)"; nlsf.x2$="%L_t$(j)"; nlsf.dataBegin=1; nlsf.dataEnd=$(anzpts); nlsf.tolerance=0; // Initialize parameter set nlsf.p1=$(pinit); //p0 nlsf.v1=0; //no vary nlsf.p2=0.001; //variable kfit nlsf.v2=1; //vary nlsf.p3=0.001; //variable kfat nlsf.v3=1; //vary nlsf.constr$=""; nlsf.constr$="0<kfit;0<kfat"; //constraints // Perform the fit // nlsf.iterateex(100); // iterate 100 times nlsf.pasteParams(PLOT); //results to worksheet// %L_p0[$(RSScount)]=$(nlsf.p1); %L_kfit[$(RSScount)]=$(nlsf.p2); //Erg kfit %L_kfat[$(RSScount)]=$(nlsf.p3); //Erg kfat %L_tfit[$(RSScount)]=$(i); %L_tfat[$(RSScount)]=$(j); %L_RSS[$(RSScount)]=$(nlsf.ssr); %L_r2[$(RSScount)]=$(nlsf.cod); RSScount++; RSScount=; }; save; //save project file }; |
 |
|
peter.cook
UK
356 Posts |
Posted - 11/16/2005 : 05:33:31 AM
|
Hi Michele,
Please view this
http://www.originlab.com/forum/topic.asp?TOPIC_ID=2054
You need to edit the nlsf.ini file accordingly.
We routinely use SaveOption=3 (can't edit formula, parameter names and constraints).
Hope it helps,
Cheers,
Pete
Edited by - peter.cook on 11/16/2005 05:36:56 AM |
 |
|
peter.cook
UK
356 Posts |
Posted - 11/16/2005 : 05:35:47 AM
|
quote:
Hi Michele,
Please view this
http://www.originlab.com/forum/topic.asp?TOPIC_ID=2054
You need to edit the nlsf.ini file accordingly.
We routinely use SaveOption=3 (can't edit formula, parameter names and constraints).
Hope it helps,
Cheers,
Pete
|
 |
|
MicheleFerrari
Germany
Posts |
Posted - 11/16/2005 : 08:36:33 AM
|
Hi Peter,
now it works without dialog box :) Thank you for your support.
|
 |
|
|
Topic  |
|