Hi, Thamizhavel
You can look at the document of curve_derivative in this page
http://www.originlab.com/doc/OriginC/ref/Curve-Derivative-GlobalFunction
However, I assume your question is how to output the result of curve_derivative in a worksheet during the fitting. If yes, here is an example to create worksheet and then output an internal result to the worksheet
void _nlsfMyGaussian(
// Fit Parameter(s):
double y0, double xc, double A, double w,
// Independent Variable(s):
double x,
// Dependent Variable(s):
double& y)
{
// Beginning of editable part
y = y0 + A/(w*sqrt(PI/(4*ln(2)))) * exp(-4*ln(2)*(x-xc)^2/w^2);
double lnxc = ln(xc);
//Generate a worksheet and output the internal result,lnxc, to the worksheet
Worksheet wks("[Book1]Sheet1");
if (!wks)
{
wks.Create("Origin.otw");
}
wks.SetCell(0, 0, "lnxc");
wks.SetCell(0,1,lnxc);
// End of editable part
}
Echo
OriginLab Corp.