//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.