Quiver and Streamline functions
10 views (last 30 days)
Show older comments
Roxanne Williamson
on 27 Feb 2022
Commented: Roxanne Williamson
on 28 Feb 2022
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')
0 Comments
Accepted Answer
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.
More Answers (0)
See Also
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!
