I added those lines to the Origin C Fitting Function, but it unfortunately does not initialize the variable.
I did:
Dataset ds("Book1", 1);
g = ds[0];
//function here
to initialize g to the first value in the 2nd column of Book1.
When performing fitting, I got this error:
Fit did not converge - Parameter(s) g are not properly initialized. Please check and correct their values.
The only way I got it to work is if I delete g from the parameters and declare it like so:
double g;
Dataset ds("Book1", 1);
g = ds[0];
//function here
Since NLFit does not accept a blank: "--" in the value field and g is a constant.
Thank you for the help, jasonzhao!