05-24-2006 04:11 PM
05-24-2006 09:01 PM
05-25-2006 02:09 AM
Kris,
like Colin has explained, the large offset of your measure represents a problem for LinFit function. Besides Colin way, one alternative solution is to scale your data before linearizing and restore their previous values after linearization:
Scale1D (x, 5, x1, &ofsx, &scalex);
Scale1D (y, 5, y1, &ofsy, &scaley);
LinFit(x1, y1, 5, z1, &slope, &intercept, &mse);
LinEv1D (x1, 5, scalex, ofsx, x1);
LinEv1D (z1, 5, scaley, ofsy, z1);
PlotXY (panel, PANEL_GRAPH, x1, z1, 5, VAL_DOUBLE, VAL_DOUBLE, VAL_THIN_LINE, VAL_NO_POINT, VAL_SOLID, 1, VAL_BLACK);
These lines produce an output fitted line that effectively represents your data (and is almost identical to Excel results).
Hope this helps