About Interpolation

greetings. Actually I'm not able to write a program for interpolation for a given set of data{2,4,8,10,12,14,16,18,20} between values 4 to 18 with 10 data points in this range. please help me write a programme of this.

 

It is not clear to me what you are trying to do, but I try to give an answer anyway.

To interpolate your data you can use the built-in Interpolate functionality (Analysis => Interpolate), where you simply choose the number of output points you would like to have. You say you want to interpolate between 4 and 18, but your data goes from 2 to 20. What do you do with these points? If you don't care about them you cut cut these points prior to interpolation, or you can think about how many points you need to include these and still get the desired number of points in the range 4-18.

Note also that (linear) interpolation happens automatically when you request an intermediate point from 1-dimensional data in Igor. See for example:

print data(2.675)
  9.35

Here, Igor gave the intermediate value between points 2 (8) and 3 (10).

I have three set of XAS data of Fe2+ and Fe3+ but , step size and starting ending points in data are different . I want to scale all three axis to be same by commands. But I'm unable to write proper commands for the operation.

But what I'll do if my data is{ 6,8,10,12,16} and want to interpolate+ extrapolate Between 4 and 18 with 10 points in between

 

Could you post some example data as attachment? It is difficult to imagine what you want to do without. I think what you want to do is quite easy by just creating a wave with the desired scaling and data points and then do:

scaled_XAS_data = XAS_data(x)

which simply fills the scaled wave at the correct points via interpolation.

For a discussion of interpolation, execute this:

DisplayHelpTopic "Interpolation"

Most likely you can use a wave assignment statement, as chozo says above, or the Interpolate2 operation.