LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to find f(x) from known values

Hello All,
 
I have some values for XY Graph like x=272,238,189,140,0 and Y=54, 56, 58, 59,58.. I am makink inperpolation and I would like to find f(x) formula of this poly. Because x values will be recalculated for different y values from this f(x) formula. Could you please help me for starting

Thanks for help
 
Brc
0 Kudos
Message 1 of 4
(2,857 Views)
Hello slrtrn :

I've made a simple VI for you that receives a Data Array containing X and Y values, and then calculates the Polynomial coefficients of the best fit poly (which would be the f(x) you need) and shows them. You can select the order of the best fit poly and the method for calculating the coefficients.

It uses the General Polynomial Fit VI.

Let me know if this solves your problem or if you need further assistance.

Robst



Robst - CLD

Using LabVIEW since version 7.0


0 Kudos
Message 2 of 4
(2,832 Views)

The answer by Robst does not deal with interpolation, just with fitting.

Newer versions of LabVIEW have a rich colection of interpolation tools and one of them should suit your needs. ("mathematics...interpolation&extrapolation" palette)

If you want to fit for a polynomial as above, you can, given the polynomial coefficients, calculate the Y for any X using "polynomial evaluation". 

0 Kudos
Message 3 of 4
(2,817 Views)
Brc:
 
As altenbach already mentioned, there is a unction in the Mathematics palette in LabVIEW called "Interpolate 1D.vi" which allows you to perform a 1D interpolation on your data. You have the choice of choosing between linear, nearest, Lagrange interpolation methods amongst others. I hope this helps and feel free to post again if you need more information.
 
Regards,
 
Rudi N.
0 Kudos
Message 4 of 4
(2,785 Views)