Problem 45259. Build edges list
Input T is a triangulation connectivity indices list (triplet list of indices -positive integers-, each index refering to a vertex number in a corresponding vertices list).
The purpose of this function is to query the list E of all the edges.
For instance if T = [1, 2, 3; 4, 5, 6; 7, 8, 9], then the output of the function must be E = [1, 2; 1, 3; 2, 3; 4, 5; 4, 6; 5, 6; 7, 8; 7, 9; 8, 9] (all the 3 possible combination of the 3 vertices of a triangle / row, for every triangle / row of the list).
Hypothesis on output E :
- size(E) = [N, 2], with N the number of edges
- E doesn't need to be ordered neither following dimension 1 (rows) nor dimension 2 (columns), but must not contain duplicated edges
- Edges are symmetric : [e1, e2] is the same edge as [e2, e1]
- Every indices are positive, distinct integers.
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers18
Suggested Problems
-
2230 Solvers
-
Generate a vector like 1,2,2,3,3,3,4,4,4,4
10697 Solvers
-
Back to basics - mean of corner elements of a matrix
405 Solvers
-
Predicting life and death of a memory-less light bulb
323 Solvers
-
Calculate the average value of the elements in the array
1124 Solvers
More from this Author9
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!