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 9:34 AM

On 10/21/2013 6:45 AM, walter Mulvany wrote:
> Elem # Nodea Nodeb Nodeax Nodeay
> 1 4 2 6 0
> 2 2 3 2 0
> 3 3 4 4 0
> 4 4 7 6 0
> 5 3 7 4 0
>
> You are right, element 1 should be (6 0), not (0 0), that was a typo,
> all the others are correct.

So, it was correct as written...

>> for i=1:length(conn),M(i,:)=[conn(i,:) Node(conn(i,1),:)];end
>> M

M =
4 2 6 0
2 3 2 0
3 4 4 0
4 7 6 0
3 7 4 0
3 6 4 0
6 2 3 1
5 2 1 1
1 5 0 0
5 6 1 1
6 7 3 1
>>

--

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