
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


> > If A is n by 3 and S is an nvector, 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

