Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Topic: data extraction from matrix to use in another matrix
Replies: 26   Last Post: Oct 22, 2013 4:57 PM

 Messages: [ Previous | Next ]
 walter Mulvany Posts: 14 Registered: 10/19/13
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.

Date Subject Author
10/19/13 walter Mulvany
10/19/13 dpb
10/19/13 walter Mulvany
10/19/13 dpb
10/19/13 walter Mulvany
10/20/13 dpb
10/20/13 walter Mulvany
10/20/13 dpb
10/20/13 walter Mulvany
10/21/13 walter Mulvany
10/21/13 dpb
10/21/13 dpb
10/21/13 walter Mulvany
10/21/13 dpb
10/21/13 walter Mulvany
10/22/13 walter Mulvany
10/22/13 dpb
10/22/13 walter Mulvany
10/22/13 walter Mulvany
10/22/13 dpb
10/22/13 walter Mulvany
10/22/13 dpb
10/22/13 dpb
10/22/13 walter Mulvany
10/22/13 dpb
10/22/13 dpb
10/20/13 dpb