Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

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


Math Forum » Discussions » Software » comp.soft-sys.matlab

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

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
dpb

Posts: 8,187
Registered: 6/7/07
Re: data extraction from matrix to use in another matrix
Posted: Oct 22, 2013 9:50 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On 10/22/2013 6:06 AM, walter Mulvany wrote:
> 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).
>>
>> Those values can be stored in a matrix, lets call it M as you named it.

> When I do that I get this error
> ??? Subscripted assignment dimension mismatch.
>
> Error in ==> trial at 13
> M(i,:)=[conn(i,:) conn(find(conn(:,1)==coord(i,1)),:)];
>
> I know I have confused you a lot with my inexperience but if you can
> just give a last chance, I think that this is correct now. I've tried
> with other people at the university and nobody knows how to do it.


It's not the inexperience that's confusing, it's that you don't
seemingly proofread what you write so what you say isn't what you
(apparently) mean. Like confounding rows and columns--if you would try
to work through the prescription you'd have found that there's a
dichotomy there--there was no '5' in the 2nd row...

Now if the above is to be believed, you don't need to "find" the element
in coord==5 because the first column as you've defined it is the same as
the index therefore the index to the row is actually the value you just
found.

Again, I suggest you _carefully_ work through your verbal descriptions
and refine them until you can actually solve the problem on paper first
-- then the code to implement that solution will fall out...or, at a
minimum as suggested, cut the size down to only 3 or so in the conn()
array so it all fits on a screen conveniently and show the inputs and
desired outputs and how they relate.

--



Date Subject Author
10/19/13
Read data extraction from matrix to use in another matrix
walter Mulvany
10/19/13
Read Re: data extraction from matrix to use in another matrix
dpb
10/19/13
Read Re: data extraction from matrix to use in another matrix
walter Mulvany
10/19/13
Read Re: data extraction from matrix to use in another matrix
dpb
10/19/13
Read Re: data extraction from matrix to use in another matrix
walter Mulvany
10/20/13
Read Re: data extraction from matrix to use in another matrix
dpb
10/20/13
Read Re: data extraction from matrix to use in another matrix
walter Mulvany
10/20/13
Read Re: data extraction from matrix to use in another matrix
dpb
10/20/13
Read Re: data extraction from matrix to use in another matrix
walter Mulvany
10/21/13
Read Re: data extraction from matrix to use in another matrix
walter Mulvany
10/21/13
Read Re: data extraction from matrix to use in another matrix
dpb
10/21/13
Read Re: data extraction from matrix to use in another matrix
dpb
10/21/13
Read Re: data extraction from matrix to use in another matrix
walter Mulvany
10/21/13
Read Re: data extraction from matrix to use in another matrix
dpb
10/21/13
Read Re: data extraction from matrix to use in another matrix
walter Mulvany
10/22/13
Read Re: data extraction from matrix to use in another matrix
walter Mulvany
10/22/13
Read Re: data extraction from matrix to use in another matrix
dpb
10/22/13
Read Re: data extraction from matrix to use in another matrix
walter Mulvany
10/22/13
Read Re: data extraction from matrix to use in another matrix
walter Mulvany
10/22/13
Read Re: data extraction from matrix to use in another matrix
dpb
10/22/13
Read Re: data extraction from matrix to use in another matrix
walter Mulvany
10/22/13
Read Re: data extraction from matrix to use in another matrix
dpb
10/22/13
Read Re: data extraction from matrix to use in another matrix
dpb
10/22/13
Read Re: data extraction from matrix to use in another matrix
walter Mulvany
10/22/13
Read Re: data extraction from matrix to use in another matrix
dpb
10/22/13
Read Re: data extraction from matrix to use in another matrix
dpb
10/20/13
Read Re: data extraction from matrix to use in another matrix
dpb

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.