Im looking for advice for efficient way to interpolate data from table like this

{{430, {70, 110, 160, 220}, {41, 53, 70, 92}}, {580, {70, 110, 160, 220}, {51, 69, 95, 122}}, {680, {160}, {111}}} // TableForm

there are three records (rows, 430,580 and 680) and this is X. For evey X, there are one or more Ys, in this case for X 430 there are four Ys(70,110,160,220), the assigned values Z for X-Y pairs are third element in every record, in this case for X,Y (430,110) pair teh Z value is 53. So I'm looking for eficient way to interpolate for between X,Y pairs for Z.

Third record have only one Y value, and it will be nice to find way to interpolate for it also.


closed as unclear what you're asking by Feyre, Wjx, MarcoB, user31159, gwr Oct 16 '16 at 16:30

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • $\begingroup$ What exactly do you want to interpolate, what should the function look like? $\endgroup$ – Feyre Oct 15 '16 at 10:32

It is not possible to give a proper answer without knowing the exact problem. Nevertheless ...

First, try to write your data in this format (explicitly write x,y,z)


Now let's say you have n number of a's (a1,...,an)

data = {{x1, y1, z1, {a1, a2, a3}}, {x2, y2, z2, {b1, b2, b3}}}
f[x_,y_,z_]= Table[Interpolate[Join[#[[1 ;; 3]], {#[[4, i]]}] & /@ data][x,y,z],{i,n}]

Not the answer you're looking for? Browse other questions tagged or ask your own question.