Prev: bar plot BaseValue
Next: Reading the excel file from simulink block and giving as output the modified excel file to another simulink block
From: Fabian on 20 Nov 2009 19:55 "Pieter Jacqmaer" <pieter.jacqmaer(a)gmail.com> wrote in message <h6pmnh$qu7$1(a)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 |