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
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 Forum for Origin C
 Insufficient Reset of NLSF when Function changes
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

khuber

Germany
Posts

Posted - 12/28/2009 :  07:07:10 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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

minimax

348 Posts

Posted - 12/29/2009 :  12:31:46 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

minimax

348 Posts

Posted - 12/30/2009 :  8:45:01 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
We will look further how to change this behavior so that conflict can disappear.

Max
OriginLab Technical Support
Go to Top of Page

Laurie

USA
404 Posts

Posted - 03/25/2010 :  6:39:30 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
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