I am trying to do a curve fit using the CVI 5.0 Advanced Analysis Library
function PolyFit(), as follows:
status = PolyFit (x, y, n, order, z, coef, &mse);
The input x[] and y[] arrays are double precision and all of the sample points
have been scaled to fall between 0 and 1. There are about 3,000 sample points.
I have tried using a polynomial order of various values between 1 and 10,
but no
matter what I do, the output coef[] array, the z[] array, and the mse error
value
all contain NaN (not a number) for each of their double precision values.
The return value (status) is 0. If I plot the x[] vs. y[] data on a graph,
the
distribution of the data points is such that I can easily visualize a curve,
but
PolyFit()
is somehow not working.
I have read and re-read the description of PolyFit in the reference manual
and have searched the Knowledge Base and CVI newsgroup to no avail.
Any suggestions?