필터 지우기
필터 지우기

Excluding points in the plot of a streamslice function?

조회 수: 3 (최근 30일)
Jacob
Jacob 2014년 4월 11일
댓글: Jacob 2014년 4월 11일
polygon1= [0.1624 -0.6477;
0.2247 -0.6477;
0.2247 0.3874;
0.1624 0.5219]
P = rand(20,2)/2
check = inpolygon(P(:,1), P(:,2),polygon1(:,1), polygon1(:,2))
plot(polygon1([1:end 1],1), polygon1([1:end 1],2),'b.-',P(:,1), P(:,2),'r*')
Imagine i have a fixed set of numbers (in this case they are random) and i find that there are some points inside this figure.
I create a grid for a certain domain:
xcoords=-0.2:0.01:1.2;
ycoords=-0.7:0.1:0.7;
[mesh1,mesh2]=meshgrid(xcoords,ycoords);
I also have created a corresponding U and V velocities for the meshgrid.
Now I want to plot my velocity field with the streamslice(mesh1,mesh2,U,V) function.
However, I dont want to include in my plot those points inside the polygon.
Is there a way to say to the streamslice function to not include certain points?
  댓글 수: 1
Jacob
Jacob 2014년 4월 11일
Please I really need to know how i can omit points in my grid so the streamslice can ignore those points inside the polygon

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by