PAYMAN RAJAI wrote:
Werner, I just want to assign each Y component to its corresponding X component. (No interpolation)
But you want to create a function. What should the function return if its argument is 6385000?
Your data will only provide values for 6380000 and 6390000? A function will have to return a value!
later in my program I will recall Y(X) for some particular X components.
Sound more complex than necessary, but you could create a function using Mathcads builtin lookup function and you will have to decide what should happen if you feed it with a value not available in X - lookup will throw an error which you can catch with an "on error".
But again, lookup(6380000,X,Y) will give you a vector with seven values, because of the many duplicates in your data.
From the graph of Y vs X, it is seen thant no two components of X are the same.
Thank you.
What do you think you can see by looking at the full plot. Look at the data itself or zoom in. The first seven values in X ARE the same and the associated Y values are all different. This is not only the case for the first seven values but happens all over throughout the whole data range.
So again, what would you like Y(6400000) to return? You have the choice amongst 14 different Y-values.
See the image below. I zoomed in to show just the first 35 data points. Do you still think that you have no duplicate X values?