[✓] Interpolate a 3D vector field?

GROUPS:
 Hello, So I'm trying to take a 3D magnetic field, and then interpolate it so I can take the differentials and plot nice magnetic fields. I'm struggling to tell interpolate how to interpolate my data - I get an error reading ListInterpolation::inhr: Requested order is too high; order has been reduced to {3,3,3,2} Which I don't quite understand. The data is fine because I can plot it correctly using ListVectorPlot3DMinimum Working Example: (*define the vectors for each dimension*) vx = ConstantArray[1, {5, 5, 5}] vx = ConstantArray[3, {5, 5, 5}] vy = ConstantArray[2, {5, 5, 5}] (*put each dimension to gether to get a 3D vector field - i.e. each point has a 3 vector at it *) together = ArrayReshape[Transpose[Flatten /@ {vx, vy, vz}], {5, 5, 5, 3}] interpolation = ListInterpolation[together] ListVectorPlot3D[together] VectorPlot3D[interpolation[x, y, z], {x, 1, 5}, {y, 1, 5}, {z, 1, 5}] Can interpolate not work with this complicated data structures, i.e. might they be scalars. Would it then be possible to combine 3 interpolation functions?
 Sander Huisman 3 Votes create an interpolation function for each 'component': vx = ConstantArray[1, {5, 5, 5}] vy = ConstantArray[3, {5, 5, 5}] vz = ConstantArray[2, {5, 5, 5}] ClearAll[if] ifs = ListInterpolation /@ {vx, vy, vz} if[x_, y_, z_] := (#[x, y, z] & /@ ifs) VectorPlot3D[if[x, y, z], {x, 1, 5}, {y, 1, 5}, {z, 1, 5}]