Problem 45256. List one vertex neighbors
First 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).
Second input i is a vertex index (positive integer).
The purpose of this function is to query the list L of all i neighbor indices.
For instance if
T = [1 2 4;...
2 3 4;...
5 6 8;...
6 7 8;...
1 2 5;...
2 5 6;...
2 3 6;...
3 6 7;...
3 4 7;...
4 7 8;...
4 1 8;...
1 8 5]
and i = 3, then the function should return
L = [2, 4, 6, 7]
since 2, 4, 6, and 7 are all part of triangles / rows in which 3 is also a vertex member.
Hypothesis :
- Output L doesn't need to be ordered, but must not contain duplicated index.
- Output L is a row vector , and if the vertex index is not in the list , the function must of course return the empty set, [].
See also
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers27
Suggested Problems
-
Return the 3n+1 sequence for n
8478 Solvers
-
Renaming a field in a structure array
1577 Solvers
-
Get the area codes from a list of phone numbers
1071 Solvers
-
Spherical radius given four points
251 Solvers
-
String Array Basics, Part 1: Convert Cell Array to String Array; No Missing Values
1948 Solvers
More from this Author42
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!