
Re: data extraction from matrix to use in another matrix
Posted:
Oct 22, 2013 10:54 AM


What I need to do is to go to element 1, read the value of (conn  column 2) which is 5, go to the coord matrix, find the value (5) in its column 1 and extract the x value that correspond to that location (5) from (coord  column 2) which in this case is (1).
In other words, I have to connect the 2 matrices (conn and coord), and the result matrix have to contain conn plus the respective x , y values of each node a and b
conn= Elem (a) (b) 1 5 2 2 2 3 3 3 4
coord= Node x y 1 0 0 2 2 0 3 4 0 4 6 0 5 1 1
The final matrix should look like this:
Elem From To ax ay bx by 1 5 2 1 1 2 0 2 2 3 2 0 4 0 3 3 4 4 0 6 0
I hope this is clear. Thanks.

