Thread Subject: arrows in streamline

Subject: arrows in streamline

From: Pieter Jacqmaer

Date: 22 Aug, 2009 21:08:01

Message: 1 of 3

Hello,

anyone who knows how to draw streamlines in Matlab with specified starting points and arrows on each of them? Streamslice can draw arrows, but I'm not sure wether the starting points can be specified.

Thanks!

Pieter

Subject: arrows in streamline

From: Raphael Attie

Date: 16 Sep, 2009 15:42:00

Message: 2 of 3

Gee ! I have exactly the same question. Any luck since your post ?
Indeed, streamslice does that only in a 2D-plane, if I understood it correctly. I personally need that for representation of magnetic field lines.

Subject: arrows in streamline

From: Fabian

Date: 21 Nov, 2009 00:55:07

Message: 3 of 3

"Pieter Jacqmaer" <pieter.jacqmaer@gmail.com> wrote in message <h6pmnh$qu7$1@fred.mathworks.com>...
> Hello,
>
> anyone who knows how to draw streamlines in Matlab with specified starting points and arrows on each of them? Streamslice can draw arrows, but I'm not sure wether the starting points can be specified.
>
> Thanks!
>
> Pieter

you can use streamline(...) to draw the streamlines, then use get(...) to get the XData and YData of each streamline (do this in a loop) and put the information in a X and Y matrix. Then use quiver(X,Y,ux,uy,scaling) to put the arrows on the streamlines. You might want to define a vector nx = 1:floor(size(X,2)/n):size(X,2); where the integer n defines how many points you want to use to plot the arrows. If you dont do this, you get many arrows and the plot gets unreadable. If you do so, use quiver(X(ny,nx),Y(ny,nx,ux(ny,nx),uy(ny,nx),scaling)

Fab

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
streamlines arr... Raphael Attie 16 Sep, 2009 11:44:06
streamlines Sprinceana 22 Aug, 2009 17:12:32
draw streamlines Sprinceana 22 Aug, 2009 17:12:32
arrows in strea... Sprinceana 22 Aug, 2009 17:12:32
plot streamlines Sprinceana 22 Aug, 2009 17:12:32
plot Sprinceana 22 Aug, 2009 17:12:32
arrows Sprinceana 22 Aug, 2009 17:12:32
rssFeed for this Thread

Contact us at files@mathworks.com