Originally Posted by cepheid
I have two data sets, each having its own array of x values and its own corresponding array of y values. I want to divide the y-values of two data sets. The problem I am having is that the x arrays for the two sets have totally different spacings (bin sizes). One set has 4175 data points, evenly spaced. The other set has its x values NOT evenly spaced and there are only 1919 data points in it.
What would be the best way of going about modifying the second data set so that it might be compared to the first one? I could just interpolate, but then I am worried that I am basically just adding made up data points to the y values for the second set, and that I might destroy some features in it, or add spurious ones.
|
A few questions:
Are the positions in the x arrays relevant? You can perhaps zero-pad the smaller array to make it the same size of the larger one. This is a tricky question to answer because it is certainly do-able, but we'd need to know more about the data and if the order and positioning of the data points is important.
So essentially you have 4 arrays? x1, y1, x2, y2? And the y arrays are derived from the x arrays?
Can you maybe sample the larger x array and extract the number of values equal to the smaller x array? Then generate y arrays that are of equal size?