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
 General introduction for Parameter Initialization

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
DER-TYP Posted - 04/23/2009 : 07:49:42 AM
Hello @all

I'm trying to write my own fitting function with the functionorganizer. The simulation of the curves works fine, but if i try to fit a curve the constants were totally wrong.
I've tryed to copy some intialization expressions from other fits but this did not work very well.
So what i'm looking for is an introduction, how the Origin-C code works.

For example:

int sign;
A = get_exponent(y_data,x_data,&B,&sign);


what means "int sign;" and how does effect the result of "A", what happens if did not mention it in the expression for "A".

In addition the 3 function i try to fit

y = A*(x*x)*exp(B*x)+y0

y = A*(x*x)*exp(-B/x)+y0

y = A*x*exp(-B)*exp(C*sqrt(D*x))+y0


I'm working with the ORIGIN PRO 8G SR2 on Win XP Pro SP3

thx at all for reading
regards
Ronny
1   L A T E S T    R E P L I E S    (Newest First)
greg Posted - 06/10/2009 : 4:51:20 PM
You could just assign some arbitrary value to each parameter and hope that the fitter can find its way to a good fit, but Origin Parameter intializations are designed to estimate an initial value for each parameter to get the fitter reasonably close before starting to fit.

We make use of several OriginC functions in trying to estimate initial parameter values. In this case, we used the get_exponent function which takes four arguments:
y_data The Y data for the fit
s_data The X data for the fit
B One of the parameters (passed by reference with &)
sign A variable (passed by reference with &)
Since 'sign' is not a parameter or dataset it needs to be declared. The line:
int sign;
declares sign as a variable of type integer.

Most of the functions you see in the built-in parameter initializations have been designed for our specific use, but there many functions available for user parameter initialization. Look in the Programming help under
Origin C\Origin C Reference\Global Functions\Mathematics\Curve
for useful functions.

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