Message Boards Message Boards


Vary Interpolation or add specific number to eliminate unwanted points?

Posted 9 months ago
0 Replies
0 Total Likes

Hello, Is there any way to vary interpolation or adding specific number to eliminate unwanted points. For example, in my case the arrows in the opposite direction. In other words, what I should add in this: Interpolation[data]

In[5]:= data = MapThread[{{#1, #2}, #3} &, {z, x, ffun}]

Out[5]= Out[5]

In[6]:= q = Interpolation[data]

Out[6]= InterpolatingFunction[{{0.336, 0.352}, {0.439, 0.455}}, <>]

In[7]:= gradient[a_, b_, i_] :=  
 Evaluate[Grad[q[a[[i]], b[[i]]], {a[[i]], b[[i]]}]]

In[8]:= gr = 
 Reap[Do[Sow[{z[[i]], x[[i]], gradient[z, x, i]}], {i, 
     Length[z]}]][[-1, 1]]

Out[8]= Out[8]

In[9]:= vunorm = Im[gr[[;; , 3]]];

In[10]:= vn = Normalize /@ vunorm;

vnn = Table[{z[[i]], x[[i]], vn[[i]]}, {i, 1, Length[vn]}]

Out[11]= Out[11]

In[12]:= list = Partition[Flatten[vnn], 4];

In[13]:= vl = 
 ListVectorPlot[list, VectorScale -> Small, VectorPoints -> {25, 25}]

For more details, please see the attachment. Many thanks in advance!

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract