Hello David,
You can use the curve fitting CVI function, PolyFit(), to find the coefficients that best represent the polynomial fit of your data points. It takes as inputs the coordinates of your data, the number of data points, and the order for the polynomial you wish to find. It outputs an array of coefficients as well as actual data points on the curve and the mean squared error. The function uses the least squares method and will create an H matrix internally. For the specific syntax of PolyFit(), see the CVI help menu.
To enhance the performance of the function and to avoid unstable results, it is important to normalize the range of your input and chose a reasonable order that is not too great. For a more detailed explanation this, see our KnowledgeBase
0VIF2UTL that can be found by searching our website at www.ni.com/support, or click on the link below:
http://ae.natinst.com/operations/ae/public.nsf/fca7838c4500dc10862567a100753500/45c2016c23b3b0298525645f0073b828?OpenDocument
I hope that you find this information useful and wish you good luck with your application. Take care!
Aaron B.
National Instruments