T O P I C R E V I E W |
scopio98 |
Posted - 04/20/2004 : 08:58:11 AM How to set the initial parameters for user-defined function?
I followed the instruction Defining Your Own Function of Two Variables in the Advanced Mode in Some General Notes on the Advanced Mode of the Nonlinear Least Squares Curve Fitter in Origin help file.
After that, I defined a new function for myself and found I don't know what the initial parameters value is. I tried to give values for them but always got error message with information "Likely caused by errors in user defined formula or poor parameter initialization".
I'll be very appreciated for any help from you!
Thanks in advance!
|
2 L A T E S T R E P L I E S (Newest First) |
easwar |
Posted - 04/20/2004 : 11:23:40 AM Hello,
There is a dialog in the NLSF tool in which you can enter parameter initialization code. This dialog can be brought up using the NLSF tool menu command: Scripts|Parameter Initialization
You then have the following choices: -> Enter Origin C code to examine the raw data and assign initial parameter values similar to how we do this for our built-in functions. There are many basic analysis functions in Origin C such as xatymax (x value at max y value) etc. that you can use and these are documented under Global Functions->Analysis topic in the programming help files -> Enter LabTalk script code to perform initialization. In this case, uncheck the "Use Origin C" check box -> Just enter constant values for each parameter, to be used as the initial value (uncheck Use Origin C)
Easwar OriginLab
|
Mike Buess |
Posted - 04/20/2004 : 10:24:57 AM nlsf.pn=value; // set the value of the nth parameter to value %A=nlsf.nn$; // assign the name of the nth parameter to %A
Mike Buess Origin WebRing Member |