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
 Parameter Initialization in NLCF

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
kevinmay Posted - 11/25/2004 : 2:15:39 PM
I am doing NLCF. Please explain me what this Parameter Initialization mean:

sort( x_y_curve );
smooth( x_y_curve );
Dataset dx;
x_y_curve.AttachX(dx);
dx = ln(dx);
x_y_curve = ln( x_y_curve );
double coeff[2];
fitpoly( x_y_curve, 1, coeff);
a = exp( coeff[0] );
b = coeff[1];

Many thanks!
1   L A T E S T    R E P L I E S    (Newest First)
easwar Posted - 11/26/2004 : 2:02:54 PM
Hello,

Comments added below to code. You can see details of functions such as sort() by looking under the Origin C Lanaguage Reference help file, under the section Global Function->Analysis.

Easwar
OriginLab


// curve here referes to the pair of x,y fit dataset
// note that the x_y_curve is a copy of the original fit data set
// so any such change made to the curve does not change the original data
//
// sort the curve so that x values are in ascending order
sort( x_y_curve );
// smooth the curve using adjacent averaging to remove noise
smooth( x_y_curve );
// declare a dataset to obtain the x values of the curve
Dataset dx;
// and attach it to the x part of the fit data curve
x_y_curve.AttachX(dx);
// convert x to log of x to change the scale
dx = ln(dx);
// convert the y values of curve to log of y
x_y_curve = ln( x_y_curve );
// now perform a linear fit of the transformed x,y curve
double coeff[2];
fitpoly( x_y_curve, 1, coeff);
// assign the offset value of the linear fit to parameter a
a = exp( coeff[0] );
// assign the intercept value of the linear fit to parameter b
b = coeff[1];
// end of initialization - now parameter a and b have values




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