Hello eveyone,
I have an issue using contour (contourf or contourc as well) with convhull in order to get the convex polygon that includes the domain where Z=1.
When i try to retrieve the contour matrix, only the coordinates contained are those of strictly inside the domain, and the edges of the domain do not appear, then the polygon I get is way smaller than I expect.
I hope this is rather clear. Thank you in advance!
Here is my code
[X_mesh,Y_mesh]=meshgrid(X,Y);
[M,h]=contourf(X_mesh,Y_mesh,Z,[1 1]);
M
M =
1.0000 1.4000 1.6000 1.6000 1.6000 1.4000 1.6000 1.8000 2.0000
8.0000 2.0000 2.2000 2.2000 2.2000 2.4000 2.6000 2.6000 2.6000
<mw-icon class=""></mw-icon>
<mw-icon class=""></mw-icon>
K=convhull(coords_x,coords_y);
contourf(X_mesh,Y_mesh,Z,[1 1]);
patch(coords_x(K),coords_y(K),'green', 'FaceAlpha', 0.5);