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
 Origin Forum
 How to set the initial parameter
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

scopio98

China
Posts

Posted - 04/20/2004 :  08:58:11 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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!


Mike Buess

USA
3037 Posts

Posted - 04/20/2004 :  10:24:57 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

easwar

USA
1965 Posts

Posted - 04/20/2004 :  11:23:40 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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

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