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
 Forum for Origin C
 Insufficient Reset of NLSF when Function changes

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
khuber Posted - 12/28/2009 : 07:07:10 AM
Origin Ver. and Service Release (Select Help-->About Origin): 8SR6
Operating System: Windows XP

Function A has a fit parameter: double w
Function B has a constant: const w=... in the 'after fitting script'

Fitting (fitter dialog) A first and then B (same data; NLFit ->
Function Selection -> Function B) I get:
W:already declared as double, cannot redeclare in the same scope!

Function B first then A:
w:cannot set value to a const!

NLSF keeps previous declarations across the scripts?

Thank you for an answer!
Kurt Huber

3   L A T E S T    R E P L I E S    (Newest First)
Laurie Posted - 03/25/2010 : 6:39:30 PM
Thank you again for bringing this issue to our attention. We have addressed it in Origin 8.1 SR2. The fitting parameters are no longer global variables. They are local to the NLFit. If you wish to try it out, you can download the demo:

http://www.originlab.com/index.aspx?s=12&lm=62

OriginLab Technical Support
minimax Posted - 12/30/2009 : 8:45:01 PM
We will look further how to change this behavior so that conflict can disappear.

Max
OriginLab Technical Support
minimax Posted - 12/29/2009 : 12:31:46 AM
Hi Kurt,

The parameters of a function will be created to Origin's workspace once a fit is done. When multiple fits are done, the variables will update with the last one.

You can run command "list a" to see those variables.

So I suggest you use another variable name instead now.


Max
OriginLab Technical Support

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