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: Extracting particular row of a matrix based on specific condition
Replies: 14   Last Post: Jan 3, 2014 10:03 AM

Advanced Search

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

Posts: 9,240
Registered: 7/26/08
Re: Extracting particular row of a matrix based on specific condition
Posted: Jan 2, 2014 1:00 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

dpb <none@non.net> wrote in message <la3v66$3rm$1@speranza.aioe.org>...

> Been puzzling over your last comment, Bruno...couldn't decide what you
> meant by "recomputing it". I guess you're speaking of the logical test
> to select nonzero elements instead of just a direct use of the logical
> addressing vector.

Yes, (ib > 0) is identical as t, wht throw it away with "~" ?

> The problem I see with sort() is that I think in the general case the
> results could be jumbled since the two matrices are given independently.
> AFAICT there's no guarantee the magnitude order would be the same as
> the position order in the B array of an arbitrary selection of values in
> the A vector. Or, at least, that's my understanding of the OP's quest...

I don't understand. In my command, sort(ib(t)) returns the indexes in ascending order. Nothing to do with "magnitude".


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

[Privacy Policy] [Terms of Use]

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