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
 Integral fitting problem
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

mccx

Turkey
Posts

Posted - 12/18/2008 :  1:07:34 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver.8 and SR 4 (Select Help-->About Origin):
Operating System:Vista

I have generated the following function, for integral equation fitting


double dIntegral = 0.0;
double dInt = 0.0;
double t = 0.0;
double dPrecision = 1e-6;
double dt = 0.05;

//the following lines actually perform a integrate to the function, the trapezoidal rule is used.

do

{
dInt = ((frac*N*Ms*pi)/6)*((1/(tanh((Ms*pi*(t^3)*x)/(6*1.38e-23*temp))))-(((6*1.38e-23*temp)/Ms*pi*(t^3)*x)))*(((y^2)*exp((-((ln(y/y0))^2)/(2*s^2)))))*dt;
dIntegral += dInt;
}
while ( dInt / dIntegral > dPrecision );
y= dIntegral
// End of editable part
}





I compiled it without errors
However, when I start fitting my data, all parameters are always zero.
What to do?

liuxiaopi

China
Posts

Posted - 12/19/2008 :  07:53:47 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,
There is not enough info in your post on the code.
I can not obtained the info about what are the fitted parameters, and what the constants in the code.

But I do find that you want to fit to an integral function with fitted parameters.

Better use other integral integrator (like NAG integrator) to perform integration for your defined function instead of doing it yourself.

Please refer to the following wiki page:

http://wiki.originlab.com/~originla/howto/index.php?title=Tutorial:Fitting_Integral_Function_with_parametric_limit_using_NAG_Library

Hope it helps,

Jack
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