A = [5 10 16 22 28 32 36 44 49 56]
B = [2 1 1 2 1 2 1 2 2 2]
How to get this?
C1 = [10 16 28 36]
C2 = [5 22 32 44 49 56]
C1
needs to get the values from A
, only in the positions in which B
is 1
C2
needs to get the values from A
, only in the positions in which B
is 2