streamline function gives empty output

9 views (last 30 days)
Tong Bo
Tong Bo on 23 Sep 2022
Answered: KSSV on 23 Sep 2022
Hi, I am trying to get the streamlines using
but the output is always empty. Then I tried
and this plots the velocity field nicely. I also
and the line is exactly where I want to plot the streamline. I am confused why I got an empty output with stream2. The variables x, y are not meshgrids, and I am not sure if this is becomes a problem for streamline calculation. Does anyone meet a similar problem before? Thanks.
Tong Bo
Tong Bo on 23 Sep 2022
Data attached. There is velocity data where I wanted to plot the streamline. I guess the non-meshgrid is the problem.

Sign in to comment.

Answers (1)

KSSV on 23 Sep 2022
Try replacing NaN's in u, v with zero and use stream2.


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!