2
$\begingroup$

I have a discrete vector field, from which I want to derive the continuous one. For example, the planar vector field is defined by:

discreteVectorField = 
Table[{x, y, Normalize[{Cos[x], Tan[y]}] // N}, {x, 1, 3, 1}, {y, 1, 3, 1}];

How to interpolate the data? (When I try to draw this vector field, I noticed that ListVectorPlot by default interpolates the data given. Could I use the interpolation function?)

$\endgroup$
2
$\begingroup$
dVF = Table[{{x, y}, Normalize@{Cos@x, Tan@y}}, {x, 1, 3, 1}, {y, 1,  3, 1}];
f = Interpolation@Flatten[dVF, 1];
VectorPlot[f[x, y], {x, 1, 3}, {y, 1, 3}]

Mathematica graphics

$\endgroup$
  • $\begingroup$ Could you add the plot of the original vector field before interpolation @Dr.belisarius? So that we can compare before/after? (I don't have Mathematica here so I cannot run it, but it's just for general knowledge about vector field interp.) $\endgroup$ – Basj Nov 3 '19 at 23:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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