Unique quad element list
显示 更早的评论
Dear all,
i am stuck with a small (easy) problem and need a hint.
Consider you have a non-unique element list t_quad with size(n_quad,4) and a corresponding non-unique point list p_quad with size(n_points,2).
Moreover, the point list also contains points which are never indexed by the element list.
I want to make both lists unique meaning i want to have a t_quad_unique list and a p_quad_unique list:
% Works!: This removes the non-unique elements and the corresponding points
[t_quad,~,~]=unique(t_quad,'rows');
[p_quad,~,b]=unique(p_quad,'rows');
t_quad(:)=b(t_quad(:));
Then after this i want to remove also the non-used points which are never used by the element list:
% Does not work!
[p_quad,~,b]=unique(p_quad(t_quad(:),:),'rows');
t_quad(:)=b(t_quad(:));
I lose some informations in this step. Where is the mistake?
Thanks for your help!
Edit:
Before:

After:

6 个评论
madhan ravi
2020-7-8
A minimum working example would help. Explicitly show how your expected result should look like a particular matrix.
ConvexHull
2020-7-8
ConvexHull
2020-7-8
编辑:ConvexHull
2020-7-8
ConvexHull
2020-7-8
编辑:ConvexHull
2020-7-8
ConvexHull
2020-7-8
编辑:ConvexHull
2020-7-8
ConvexHull
2020-7-8
编辑:ConvexHull
2020-7-8
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!