tt = Flatten[Table[{x, y, z, btot[x, y, z]}, {x, -1, 1, 0.1}, {y, -1, 1,0.1}, {z, -1, 1, 0.1}], 2]; ff = Interpolation[tt] Till here it is working fine as it is returning the values of the interpolated function at various {x,y,z}{x,y,z} points. Then
Then I want to find the gradient of this interpolated function. But when I am using ffd[x_,y_,z_]:= D[ff[x,y,z],{{x,y,z}}] I
ffd[x_,y_,z_]:= D[ff[x,y,z],{{x,y,z}}] I am not getting the gradient.