streamline function gives empty output

5 vues (au cours des 30 derniers jours)
Tong Bo
Tong Bo le 23 Sep 2022
Réponse apportée : KSSV le 23 Sep 2022
Hi, I am trying to get the streamlines using
verts=stream2(x,y,u,v,startX,startY)
but the output is always empty. Then I tried
quiver(x,y,u,v)
and this plots the velocity field nicely. I also
plot(startX,startY)
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.
  2 commentaires
KSSV
KSSV le 23 Sep 2022
Attach your data....If it is empty that means, there is not streamline starting from the side you have mentioned.
Tong Bo
Tong Bo le 23 Sep 2022
Data attached. There is velocity data where I wanted to plot the streamline. I guess the non-meshgrid is the problem.

Connectez-vous pour commenter.

Réponses (1)

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

Catégories

En savoir plus sur Axes Appearance dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by