streamline not passing through an object
이전 댓글 표시
Dear all,
I have a data-set including x,y,u,v columns corresponding to 6384 points in a flow field.
I would like to draw corresponding streamlines. Applying the streamline function in MATLAB, it produces streamlines which cross solid objects in the flow field.
Here is the graphical representation:

red rectangles are solid objects and streamlines should not pass through them. I know that this comes from the interpolation I need to perform in order to get a grid-base data-set (please see my code below). Do you know how can I fix this irrelevant regions?
x=data_vel(:,1); y=data_vel(:,2);
u=data_vel(:,3); v=data_vel(:,4);
d_x=linspace(2,8.5,100); d_y=linspace(0,0.7,100);
[xx,yy]=meshgrid(d_x,d_y);
F1=scatteredInterpolant(x,y,u); uu=F1(xx,yy);
F2=scatteredInterpolant(x,y,v); vv=F2(xx,yy);
figure(1) streamline(xx,yy,uu,vv,xx,yy);
Many thanks for your help in advance,
Reyhaneh
답변 (1개)
Walter Roberson
2015년 12월 22일
0 개 추천
In a situation such as that you are probably going to need to break your data up into chunks and streamline() each of them separately.
카테고리
도움말 센터 및 File Exchange에서 Vector Fields에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!