Get boundary of 2d mesh
6 次查看(过去 30 天)
显示 更早的评论
i have a 3d mesh, i delete z axes and so i'll have 2d mesh. my question is how can i get boundary of the 2d mesh?
1 个评论
回答(2 个)
KSSV
2018-8-24
Read about boundary function.
%%Structured data
[X,Y,Z] = peaks(100) ;
idx = boundary(X(:),Y(:)) ;
figure
plot(X,Y,'.r') ;
hold on
plot(X(idx),Y(idx),'.-b')
%%Unstructured data
x = rand(100,1) ; y = rand(100,1) ;
idx = boundary(x,y) ;
figure
plot(x,y,'.r')
hold on
plot(x(idx),y(idx),'.-b')
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Surface and Mesh Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!