I have an interpolation function. Lets think of it as f={fx,fy,fz}
.
I would like to operate on the fx part of interpolation and say, multiply it by five and plot it.
I can easily separate the derivative of interpolation function, as seen below as a curl, but I can't work out how to do anything similar for the original interpolation function.
f[x_, y_, z_] := {y, x, 0}
testdata = Flatten[Table[N@{x, y, z, {y, x, 0}}, {x, -3, 3 , 0.5}, {y, -3, 3,0.5},{z, 0, 1, 0.5}], 2];
intf = Interpolation[testdata];
intfd[x_, y_, z_] = D[intf[x, y, z], {{x, y, z}}];
intfcurl[x_, y_, z_] :=
Module[{q = intfd[x, y, z]}, {q[[2, 3]] - q[[3, 2]], q[[3, 1]] - q[[1, 3]], q[[1, 2]] - q[[2, 1]]}]
VectorPlot3D[intf[x, y, z], {x, -3, 3}, {y, -3, 3}, {z, 0, 1}]
VectorPlot3D[intfcurl[x, y, z], {x, -3, 3}, {y, -3, 3}, {z, 0, 1}]
Edit for clarification: Is there a way to do use the interpolation function like the curl example? e.g r= intf[x, y, z], then r[[1]] for the x dimension?
What I would like to do is multiply the x dimension of the interpolation function with the x dimension of the curl, i.e., I'd like to do something like:
intffunction[x_, y_, z_] :=
Module[{q = intfd[x, y, z], r= intf[x,y,z]}, {r[[1]](q[[2, 3]] - q[[3, 2]]), r[[2]](q[[3, 1]] - q[[1, 3]]), r[[3]](q[[1, 2]] - q[[2, 1]])}]
Where r[[1]], r[[2]] and r[[3]], refer to the x,y,z dimensions respectively. Of course, however, r[[1]], and r[[2]], r[[3]] doesn't refer to the x,y,z dimensions in mathematica, but hopefully this gives an idea.