I'm attempting to apply a small data set onto a larger array given a logical array and can't figure out how to tackle the problem. As an example given a much smaller array.
Logical Array [1,0,1,0,1,0,0,0,1]
Data Array [5,3,7,4]
Output [5,0,3,0,7,0,0,0,4]
Any guidance would be apprieciated.
Best Answer