if i have a set of 9 points how can i get the function???

If you have Px,y(1) to Px,y(N) points with x and y values, then

the linear function is F(x):

if x is between Px(i) and Px(i+1), then

a = ( x - Px(i) ) / ( Px(i+1) - Px(i) )

F(x)= Py(i) * a + Py(i+1) * ( 1 - a )

else if x < Px(1) then F(x) = Px(1)

else if x > Px(N) then F(x) = Px(N)

If you want a polynomial function that pass through every point you can use the Newton polynomial function.

http://en.wikipedia.org/wiki/Newton_polynomial

or the Lagrange form

http://en.wikipedia.org/wiki/Lagrange_polynomial

But beware, with 9 point you can get a 9 grade polynomial that will rise very fast for number outside the interval of your point.

Otherwise if you want an approximation of the formula and you already know the distribution of your point you can use a least squares method.

http://en.wikipedia.org/wiki/Least_squares

it worked thanks alot