# Find a function from values

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!

• Dec 3, 2010 at 2:24
• @Mo: dunno, that one was a tad simpler since his data already looked awfully linear... but I won't object if people vote to close this one. Dec 3, 2010 at 2:26
• 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, but I can not get values in a sequence where x = 1,2,3 , 4 ... as in that question Dec 3, 2010 at 2:40
• @J.M: Yes, I did not cast a close vote because I wasn't sure. Dec 3, 2010 at 5:11
• Can you describe exactly what these sensors do? Some people here are very good in physics and might be possible to extract theoretical relations. Dec 3, 2010 at 5:18