T O P I C R E V I E W |
mccx |
Posted - 12/18/2008 : 1:07:34 PM 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? |
1 L A T E S T R E P L I E S (Newest First) |
liuxiaopi |
Posted - 12/19/2008 : 07:53:47 AM 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 |
|
|