This content is not available in your preferred language.

The content is shown in another available language. Your browser may include features that can help translate the text.

Plotting a Polynomial Best Fit Line

Updated Oct 10, 2018

Reported In

Software

  • LabVIEW

Issue Details

I have an Excel spreadsheet with a 6 order polynomial best fit line and the line equation. I want to do this in LabVIEW, using the General Polynomial Fit.VI, but when I try to use it I don't get the same polynomial coefficients as I did in Excel. 
 

Solution

In order to plot a polynomial best fit line,
1. Transpose the 2D array
2. Split the 2D array into 2 separate 1D arrays. One array will become the X values and the other the Y values.
3. Use the general polynomial fit.vi to input these values and display the coefficients and the graph with the original plot in one graph. 
Note:  You can change the order of the polynomial equation to best fit the data.