MATLAB: Re-Asking a Question: Creating a Connection Matrix from an indexed point set

comparematricesmatrix manipulation

Hello, all, I am re-asking a question because of a lot of ambiguity with my original post.
Simply put, I want to create a matrix depicting the connection of indexed points.
What I had to begin with is a 7xN matrix, where each row had the radius for segment, and the x y and z coordinates of the two points that made up the line.
Because the first point was from the first three column entries, and the second point form the second three column entries, I put them into two 3xN matrices: my "from point" matrix which had the first three coordinates for each parent segment, and the "to point" matrix which had the last three coordinates for each daughter point.
Since every daughter point was unique, I added all of the elements of the "to point" matrix, plus the beginning point, into my revised point matrix, which I added a column segment incrementor (so I know exactly what point 1 coordinates are, etc). I then indexed my set, so I have something like:
1 0 0 10
2 0 0 0
3 3 4 -4
4 2 6 -10
etc.
Now, with my indexed point matrix, I want to go back to my "from point" parent matrix, and compare the items row by row with my indexed matrix 2-4th numbers, and spit out the indexes of the points as a connection matrix.
so, if my "from point" matrix and indexed set looked like:
FROM POINT MX INDEXED POINT MX
I want to create a connection (or face) matrix, with the elements:
5,2
4,3
2,4
3,5
This is just an example. The second column will always be an incremented value of 2 to N point, because the "to point" will always be denoted by the indexed value of the index matrix.
Is this clear so far? I apologize for the ambiguity of my original statement.

Best Answer

a - your matrix
a =[0 0 10
0 0 0
3 4 -4
2 6 10];
fp = [ 0 0 10
2 6 10
0 0 0
3 4 -4];
tp = [0 0 0
3 4 -4
2 6 10
0 0 10];
[l1,l1] = ismember(fp,a,'rows');
[l2,l2] = ismember(tp,a,'rows');
out = [l1, l2];