Assume that we have a 100\*4 array.

We also have a 100\*1 array of 1 and 0. Assume there are n 1's.

We want to create a n\*4 array from the 100\*4 array, where we only include the columns for which the second array is a 1. 

One way to do it is through a double for loop. Is there a simpler method?

So, We have

```
A = [ [ 332 44 33 22 33 55 33 211 .....
      [ 823 44 12 98 19 23 32 911 .....
      ....
      ....
    ]

```

and 

```
 B = [1 0 0 1 0 0 0 ....]

```

and we want 

```
 C = [ [ 332 22 ...
       [ 823 98 ...
       ....
       ....
     ]

```