6
$\begingroup$

Is there any way to find a function, even just similar, from a set of values?

I get these pairs of values from two sensors and would like to find a simple function that describes the relationship between these pairs of numbers and then to estimate the values without having to take each time.

I have a "black box" sensor, connected to a potentiometer that gives me a value for the direction of a servo, I noticed that the value is offset by a number (eg 200 -> 11, 72 -> 5) and I wanted to understand if it was possible to solve this error from outside this box approximating the value of error that could return from a given parameter.

example: I have some values (x, y):

{(200, 11), (72, 5), (36,3), (28,3), (18,2), (12,2), ...} 

what is the function that can return these values and all others who follow this trend on a graph, more easily and better possible?

thank you, hello!

  • 0
    I have a "black box" sensor, connected to a potentiometer that gives me a value for the direction of a servo, I noticed that the value is offset by a number (eg 200 -> 11, 72 -> 5) and I wanted to understand if it was possible to solve this error from outside this box approximating the value of error that could return from a given parameter. Thanks to all. EDIT: I found this tool, It could help me? xuru.org/rt/NLR.asp2010-12-03

1 Answers 1

8

Assuming those values came from a polynomial, what you want to do is polynomial interpolation.

In this case, since you have six points, the degree of the polynomial is at most five, since six coefficients are needed to uniquely determine a quintic.

Wolfram Alpha is able to determine interpolating polynomials from given data, e.g. this.

  • 0
    @frx: Remember the mantra: "garbage in, garbage out" :)2010-12-04