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: 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: 2   Last Post: Sep 24, 2012 5:36 AM

 Messages: [ Previous | Next ]
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 22, 2012 4:27 PM

Given a 3 column array A of x,y,z numbers, defining a set of spatial coordinates, and a binary or logical selection vector S (with as many elements as rows in A) :

How do I express the operation of selecting an array R with the set of those co-ordinates in A where S is 1 (or true) ?

In Apl I write this as R ? S /[1] A .

But a referee of a paper is asking that I express this in standard maths, and I have not yet managed to find an appropriate mathematical expression.
Cheers for any help,
Beau