Search All of the Math Forum:

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

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

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 20, 2013 8:23 PM

I'm very sorry to say that it did not work because it arranged the matrices.
I need to go to matrix (connect) element 1, read node(a) and see that is a 4, because is the node 4, then I need to go the the matrix (coordinates), look for the node 4, and extract from node 4 the coordinate (x) and place it on an array nodeax.
repeat the process with all the elements.
As you can see, when the code reaches element 4, the node is 4 as well as element 1.
This has to be done for each of the elements from 1 to n (11) in this case.

Elem (a) (b)
1 4 2
2 2 3
3 3 4
4 4 7
5 3 7
6 3 6
7 6 2
8 5 2
9 1 5
10 5 6
11 6 7

Node X Y
1 0 0
2 2 0
3 4 0
4 6 0
5 1 1
6 3 1
7 5 1

The final matrix should look like this
Elem Nodea Nodeb Nodeax
1 4 2 0 0
2 2 3 2 0
3 3 4 4 0
4 4 7 6 0
5 3 7 4 0
6 3 6 4 0
7 6 2 3 1
8 5 2 1 1
9 1 5 0 0
10 5 6 1 1
11 6 7 3 1
I hope I'm explaining it better now, I realize that I was not clear in the way I expressed the problem.
Thanks again for your time and for doing this for me.

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