 Timestamp:
 11/18/11 09:07:43 (8 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/projects/slimcurve/src/main/c/EcfSingle.c
r7803 r7809 745 745 if (paramfree[j]) 746 746 mfit++; 747 747 748 748 if (GCI_marquardt_compute_fn(x, y, ndata, noise, sig, 749 749 param, paramfree, nparam, fitfunc, … … 891 891 } 892 892 893 /* Matrix solution; GCI_gauss_jordan solves Ax=b rather than AX=B */ 894 if (GCI_solve(covar, *pmfit, dparam) != 0) 895 return 1; 893 if (*pmfit>0) { 894 /* Matrix solution; GCI_gauss_jordan solves Ax=b rather than AX=B */ 895 if (GCI_solve(covar, *pmfit, dparam) != 0) 896 return 1; 897 } 898 else 899 *alambda = 0; 896 900 897 901 /* Once converged, evaluate covariance matrix */ … … 1287 1291 /* We wish to find yfit = (*pfnvals) * instr, so explicitly: 1288 1292 yfit[i] = sum_{j=0}^i (*pfnvals)[ij].instr[j] 1289 But instr[k]=0 for k >= ninstr, so we only need to sum: 1293 But instr[k]=0 for k >= ninstr, AND (*pfnvals)[i]=0 for i<0 1294 so we only need to sum: 1290 1295 yfit[i] = sum_{j=0}^{min(ninstr1,i)} 1291 1296 (*pfnvals)[ij].instr[j] … … 1296 1301 for (k=1; k<nparam; k++) 1297 1302 (*pdy_dparam_conv)[i][k] = 0; 1303 1298 1304 1299 1305 convpts = (ninstr <= i) ? ninstr1 : i; … … 1679 1685 /* We wish to find yfit = fnvals * instr, so explicitly: 1680 1686 yfit[i] = sum_{j=0}^i fnvals[ij].instr[j] 1681 But instr[k]=0 for k >= ninstr, so we only need to sum: 1687 But instr[k]=0 for k >= ninstr, AND (*pfnvals)[i]=0 for i<0 1688 so we only need to sum: 1682 1689 yfit[i] = sum_{j=0}^{min(ninstr1,i)} 1683 1690 fnvals[ij].instr[j]
Note: See TracChangeset
for help on using the changeset viewer.