streamline function gives empty output

조회 수: 5 (최근 30일)
Tong Bo
Tong Bo 2022년 9월 23일
답변: KSSV 2022년 9월 23일
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
KSSV
KSSV 2022년 9월 23일
Attach your data....If it is empty that means, there is not streamline starting from the side you have mentioned.
Tong Bo
Tong Bo 2022년 9월 23일
Data attached. There is velocity data where I wanted to plot the streamline. I guess the non-meshgrid is the problem.

댓글을 달려면 로그인하십시오.

답변 (1개)

KSSV
KSSV 2022년 9월 23일
Try replacing NaN's in u, v with zero and use stream2.

카테고리

Help CenterFile Exchange에서 Axes Appearance에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by