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 ]
 dpb Posts: 9,850 Registered: 6/7/07
Re: data extraction from matrix to use in another matrix
Posted: Oct 21, 2013 8:28 PM

On 10/21/2013 5:10 PM, walter Mulvany wrote:
...

> What I need to do is to go to element 1, read the value of (conn - row
> 2) which is 5, go to the coord matrix, find the value (5) in its row 1
> and extract the x value that correspond to that location (5) from (conn
> - row 2) which in this case is (1).
>
> Those values can be stored in a matrix, lets call it M as you named it.
> I think that the confusion came because I had the other matrices nodeax
> and nodeay and you probably thought that they existed as part of the
> input but I just put it there to show how the matrix with the
> coordinates look like.
>
> conn=[1,5,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];
> coord=[1,0,0;2,2,0;3,4,0;4,6,0;5,1,1;6,3,1,;7,5,1];

...

> I apologize for all the confusion and I appreciate you effort.
> Thanks.
> Let me know if you need any additional information.

Well, yes, if the nodes that you were using weren't the actual inputs
then that does confuse things, indeed, since that's how you described
what it was you were looking to construct. I agree it didn't really
seem to make much sense but was just trying to do what was illustrated
as wanted.

Now then, if the node array is not there, let's take what _is_ and then
just the first 2 or three and then show what you're looking for as the
result -- it surely isn't clear to me why you start at element 1 and
then talk of row 2...??? Perhaps, even, you're mixing row w/ column as
there's no '5' in row 2 of conn but the value of row 1, col 2 is 5???

But, the idea of finding the location of a value in another array based
on the value instead of just the position was clearly demonstrated in
the last posting so if you do know which elements you're looking for it
shouldn't be too much to modify the previous example using the proper
arrays and indices.

But, if you can't get there from here, again straighten out the
nomenclature to get a description consistent with the data organization
and an example of the actual M desired for a small subset thereof...

--

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