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 » sci.math.* » sci.math.num-analysis.independent

Topic: Binary or Logical Selection : Given an array A and a binary or
logical vector S, how do I select the rows of A when S = 1 or True ?

Replies: 6   Last Post: Sep 24, 2012 5:42 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
dr.beauwebber@googlemail.com

Posts: 7
Registered: 9/22/12
Re: Binary or Logical Selection : Given an array A and a binary or
logical vector S, how do I select the rows of A when S = 1 or True ?

Posted: Sep 23, 2012 5:57 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply


>
> If A is n by 3 and S is an n-vector, then define a selection matrix,
>
> say T, as those rows of an n by n identity matrix for which the
>
> corresponding element of S is 1. Then R = TA contains the
>
> coordinates of the points you want. (Yes, I realize that might be
>
> seen as cheating, because we haven't expressed T as a function of
>
> S using standard operators. If we could, we wouldn't need T!)


Ah, I think that I understand that.
I have to start with S as I have spent various lines defining it, then,
I think I can say :
T ij = 0
Tii = Si
R = TA

Something like that ?
cheers,
Beau



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.