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 for Programming
 LabTalk Forum
 Creating a new Parameters Initialization Script
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

egonnelli

Brazil
9 Posts

Posted - 10/04/2012 :  5:50:01 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hello,

I am in doubt about the "Parameters Initialization" from the "Holliday Model" Built Function. The question is understand this function and apply the same script for the "Parameters Initialization" to another equation.

The Holliday Model function is in the form: "y=1/a+b*x+c*x^2" and the script for initialization is:

------------------------------------------------------

sort(x_y_curve);
smooth(x_y_curve);
x_y_curve = 1.0 / x_y_curve;
double coeff[3];
fitpoly( x_y_curve, 2, coeff);
a = coeff[0];
b = coeff[1];
c = coeff[2];


-------------------------------------------------------

Now my question,

If I want to Apply this script for another equation, in this case:

"y = K/(a+b*x^2+c*x^4)+ T; " (It looks like the above equation, but substituting "1.0" by K. And changing the degree of the denominator polynomial for 4th. Plus a constant "T")

What is the new script in these conditions?




Thank you very much,

Eduardo

egonnelli

Brazil
9 Posts

Posted - 10/04/2012 :  8:21:17 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Another thing,

What is the logic in the Initialization Parameters script, because in the Holliday1 function, y=a/(a+b*x+c*x^2), the script is:

sort( x_y_curve );
smooth( x_y_curve );
x_y_curve = 1.0 / x_y_curve;
double coeff[3];
fitpoly( x_y_curve, 2, coeff);
a = 1 / coeff[0];
b = a * coeff[1];
c = a * coeff[2];

Note that,in the case of Holliday function, y=1/(a+b*x+c*x^2), the script is simpler than the Holliday1


sort( x_y_curve );
smooth( x_y_curve );
x_y_curve = 1.0 / x_y_curve;
double coeff[3];
fitpoly( x_y_curve, 2, coeff);
a = coeff[0];
b = coeff[1];
c = coeff[2];
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