0

I'm using the streamline function (streamline(X,Y,U,V,startx,starty)) to plot the streamlines of a 2D vector field.

I would like to have an evoluting line width along the streamlines according to the value: sqrt(U.^2+V.^2) in each point.

How can I achieve this? Thank you in advance.

CherryDT
  • 25,571
  • 5
  • 49
  • 74
  • By evoluting line width do you mean if the magnitude of the stream (```sqrt(U.^2 + V.^2)```) is larger the line will be thicker? – fendall Sep 04 '19 at 19:13
  • Yes exactly. That's what I meant – user12021493 Sep 05 '19 at 20:11
  • I think you'll need to write your own streamline function that performs all the interpolation necessary to draw the streamlines (drawing small individual lines with widths of your choosing). Alternatively, you can use the ```quiver``` function to give a similar effect of showing the magnitude at different points within the field. To be clear, you would use a combination of the streamline function you are already using as well as quiver. – fendall Sep 05 '19 at 20:15
  • Thank you for this information. I was wondering if there is any simple way for this situation. – user12021493 Sep 06 '19 at 18:15

0 Answers0