Quiver and Streamline functions

10 views (last 30 days)
How does one change the angles of the streamlines with this code?
[x,y] = meshgrid(0:0.1:1);
u = x;
v = -y;
quiver(x,y,u,v)
startx = 0.1:0.1:1;
starty = ones(size(startx));
streamline(x,y,u,v, startx, starty)
title('Uniform Flow')

Accepted Answer

the cyclist
the cyclist on 27 Feb 2022
Have you read the documentation for streamline function? Do you feel you understand what it is displaying?
The streamlines are a function of the inputs. So, to change the streamlines, you obviously have to change the inputs. For example
[x,y] = meshgrid(0:0.1:1);
u = x;
v = -3*y;
quiver(x,y,u,v)
startx = 0.1:0.1:1;
starty = ones(size(startx));
streamline(x,y,u,v, startx, starty)
title('Uniform Flow')
I've changed the streamlines. Does that help? I think it probably doesn't. Maybe you need to ask a more specific question.
  1 Comment
Roxanne Williamson
Roxanne Williamson on 28 Feb 2022
I believe I was having a blonde moment. The functions were too similar, I wasnt noticing the difference but I see now. Thank you for the assistance!

Sign in to comment.

More Answers (0)

Categories

Find more on Vector Fields in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!