0

I have several (denoted by index i) sets of datapoints (x,y) stored in vectors x_i and y_i.

x_i is not necessarily of the same lenght as x_i+1.

I want to interpolate the data for every i separately and then work with the interpolated functions f_i.

I have tried with scipy.interpolate and get interp1d objects as a result. These however are not sufficient since I need

  • Addition: f_i + f_i+1
  • scalar multiplication: a * f_i
  • shift/ dilation: f(a * x + b)

The goal is to optimize the difference between f_i+1 and some manipulation of f_i to find the evolution. This is very hard to accomplish using vectors since the x_i[n] does not necessarily correspond to x_i+1[n] (not even when i use interpolation and gridding)

Thanks for any suggestions

Stephan

Phteven
  • 161
  • 2
  • 10
  • How do you plan to add if your `f_i` is not the same length as `f_i+1`? Your question is currently too broad to answer. Have you tried something which you would like to share? Otherwise, it sounds like a big homework for people to solve – Sheldore Sep 19 '18 at 15:53
  • The function f_i (say ) can be evaluated for any grid i choose and therefore has "infinite dimension". I want to add it the same way i'd add the functions x and sin(x). The only issue could be the domain of the f_i but that can be solved by adding 0 as datapoints at the beginning and end for all y_i. the problem i face is that I cannot do anything with the functions but evaluate them for a given grid – Phteven Sep 19 '18 at 19:41
  • I don't see the problem; all the linear operations you want, should be easy to perform with `scipy.interpolate` assuming that the `x_i` cover the same space. – mikuszefski Sep 27 '18 at 13:11

0 Answers0