Logarithm interpolation

Hi All.
I am trying to create function which will allow me to make logarithmic interpolation. I can not find such kind of it, but I know that it exists.

I need that function takes two arrays of double(x,y) and obtains array of interpolated function values(y).

First that comes to mind it's find a linear interpolated function and after that apply pow with base 2.7.

But, I can not even understand approach which can allow to take into account already existing points values of arguments. I guess that some kind of binary search should be use, but it's too complex. May be there is another way?

Thanks
I need that function takes two arrays of double(x,y) and obtains array of interpolated function values(y).
Why two arrays of double?
For calculation of the value of a function between the values already known, we need two values and domain of the function.

Sorry I haven't done interpolation before so if you explain me how it is done on paper I'll try to help.
I am trying to create function which will allow me to make logarithmic interpolation. I can not find such kind of it, but I know that it exists.
nope, it does not exist in the standard library in the way you want it.
The standard library provides basic stuff so you can implement something like that without any problems.

look at these two functions, with them you should be able to make the functions yourself.
log: http://www.cplusplus.com/reference/cmath/log/
exp: http://www.cplusplus.com/reference/cmath/exp/
Last edited on
I think that if you professionally work with such things http://www.gnu.org/software/gsl/ - it's for you;) But if you study or just interests you can take code from http://www.know-all.net/articles/view/71
Last edited on
Ah...Thanks guys! Example is good.
Topic archived. No new replies allowed.