How can I plot Streamline from a stream function?

100 views (last 30 days)
Hello,
I have a stream function psi = 1.2X^2 + y^2. I have to plot streamline. How can I plot it by using MATLAB?
Thank you.

Accepted Answer

Cris LaPierre
Cris LaPierre on 2 Apr 2021
  10 Comments
Alpha Boy
Alpha Boy on 2 Apr 2021
[x,y] = meshgrid(-3:.5:3,-3:.5:3);
u = x;
v = -y;
figure
startx = -3:0.5:3;
starty = ones(size(startx));
streamline(x,y,u,v,startx,starty)

Sign in to comment.

More Answers (1)

vishal
vishal on 15 Apr 2025

U=Kx V=-Ky

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!