Lets say we have the following fitting function:.Code:
void fit(float x, float y, int ndata, float sig, int mwt, float *a, float *b, float *siga, float *sigb, float *chi2, float *q,float *r2)
Then we haveSo basically it is saying . Why is this?Code:
*chi2 += SQR(y[i]-(*a)-(*b)*x[i]);
Is there any easy way to obtain from so that I can use it in the program? Note that we have .