Complicated Interpolation (Multivalued)

  • Thread starter Thread starter ZombieKitty
  • Start date Start date
  • Tags Tags
    Interpolation
ZombieKitty
Messages
6
Reaction score
0
Hi,

I'm trying to interpolate a data set of classical trajectories, but I'm having trouble because the data is basically a multivalued function. The data maps out a periodic function: for every x value, there are about 7 y values.

Does anyone have any advice as to how to approach this? Most of the interpolation routines I'm trying to implement require that x1< x2< xn.. which isn't the case since it's periodic.

Also, I can think of a few tricks to get around it for the simplest case, which basically looks sinusoidal but flipped vertically.. but some of the other data sets are much more complicated (though still periodic).

Any direction would be greatly appreciated. Thanks!
 
Physics news on Phys.org
Can you switch y and x?
 
The problem with that is that I need to interpolate at very specific x values. If I were to switch x and y, I'd now be feeding my routine a particular y value and it'd be returning the corresponding x... but this is not necessarily at the x value I need. Does that make sense?

I'm now thinking that if I can fit the data to a particular polynomial.. I can easily find any values I need, granted that it's possible to find a well-fitting function. I'm confident this will work for some of the simpler data sets, but not so sure with the more complicated data.
 
Back
Top