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
 Origin Forum
 Fitting constraints - keep original

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
peter.cook Posted - 09/26/2002 : 07:24:04 AM
Hi,

I have a fitting function that has predfined constraints that I always want to appear as the default values when a new fitting session is launched eg

nlsf.constr$="lrmax<Rmax<urmax;"

which I would liketo change eg

nlsf.constr$="Rmax=Rmax_2;" as per 2 datasets together.

but I don't want the fitting function (ie fdf file) to be altered. Even if I write protect, then I still get prompted with the dialog box which is a pain.

(Origin 6.1 for this app)

Cheers,

Pete





3   L A T E S T    R E P L I E S    (Newest First)
Laurie Posted - 09/27/2002 : 12:24:33 PM
Hi Peter,

There was no LabTalk equivalent of parameter sharing until version 7 (also I believe that you need SR2). The LabTalk command is nlsf.sn=1; where n is the enumerated parameter. For example nlsf.s1=1; would share the first parameter in the fitting function.

Whether or not you use nlsf.constr$="Rmax=Rmax_2=Rmax_3.." or parameter sharing the result will be the same. However, I understand why you would like to use sharing because then you wouldn't be modifying the fitting function. Using constraints then brings up the save prompt message.

Upper and Lower bounds is for individual parameters where as constraints you can set up linear relationships between more than one parameter.


Laurie


OriginLab Technical Support
peter.cook Posted - 09/27/2002 : 09:58:04 AM
Hi Laurie,

Thanks - I do remember this request from a while back and wondered if I had missed something with Origin 6.1...what I'm trying to do use global fitting with Origin 6.1 LabTalk where the number of datasets can vary. The example provided (Easwar?) showed how this can be done by using eg nlsf.constr$="Rmax=Rmax_2=Rmax_3.." which of course results in the prompt to save / alter constraints even when this isn't possible eg if the fdf file or fitfunc directory is read-only...what I was trying to avoid.

However, what is the labtalk equivalent of sharing a parameter using the nlsf dialog or, to put it another way, does this differ from the above? Can I for example use nlsf.constr$="lrmax<max<rmax" as the default and somehow select the Rmax parameter to be shared across datasets..

Also, what exactly is the difference between using upper and lower bounds as opposed to the constraints? Somehow I've ended up setting default lower and upper bounds asvery low and high respectively, then setting them to different values prior to nlsf.iterate().

Thanks,

Pete

Laurie Posted - 09/27/2002 : 09:11:33 AM
Hi Peter,

You'll need Origin 7 for this. The following feature was implemented from a request you had made awhile back.

There is a flag - property of each category in the nlsf - that can be set. If the flag is set, modifications to any of the functions in this category will not be saved.

In the nlsf.ini file, you can add the following to any or all categories:

SaveOption =


The default value for SaveOption is 0; so if the key is missing for a category or if
SaveOption = 0
modifying and saving changes to functions in the category will work just as before (the user can modify and save everything for a user defined function; for built-in functions the formula can not be modified.)

The SaveOption is a bit oriented property. The following rule apply:
1. If any of the bits is on (i.e SaveOption != 0) for a category, the user can not save permanently (in the fdf file) the changes he makes to a function in this category; the "Save" btns are disabled and when exiting Origin there is no prompt to save
Bit 1 on - can not modify formula and parameter names
Bit 2 on - can not modify constraints (linear and to parameters)
Bit 3 on - can not modify initial values and initialization scripts for parameters
Bit 4 on - can not modify before fit, after fit and on parameter change scripts

If any of the bits is on for a category, the user can not delete functions from or add functions to this category.

Please let me know how this works.

Thanks,
Laurie

OriginLab Technical Support

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