Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

I am having problems with the polyfit function in CWSTAT. The problem is the data to be fitted must be nominally centered around zero for the funciton to develop a poly fit with a low MSE. Is this normal?

I found the following note about CVI's correlating Polynomial Fit function -> it might be useful. I assume "unstable results" correlates to a high MSE (Mean Squared Error). I think the answer to your question, "is this normal?", is "yes".

"If the elements in the input Array Y are large and the polynomial order is also large, you might see unstable results. One suggested workaround is to scale the input data elements so that they range from -1 to 1.
To do this:
1. Find the number, say K, in Array Y which has the highest magnitude (absolute value).
2. Divide all elements in the array by the absolute value of K.

Then apply the PolyFit function and rescale the results in the Output Array (i.e. Multiply all elements in the Output array by the absolute value of K). "


good luck
ben schulte
national instruments
0 Kudos
Message 2 of 2
(3,273 Views)