02-07-2009 12:59 PM
I have a decimal array 1 2 3 4 5 6 , and I have a boolean array with same size 0 1 0 1 1 0,
How do I extract the subset of decimal array from the corresponding "1" position of boolean array ( in this case 2 4 5 ) ?
The value of boolean array can be changed ( coule be 1 00100) , so the size of the subset decimal array is not fixed ( 1 4 ).
Solved! Go to Solution.
02-07-2009 01:24 PM - edited 02-07-2009 01:27 PM
(I assume you mean numeric array. "Decimal" is just a formatting specification and irrelevant for this)
Try something like the following (The FALSE case has the array just wired across unchanged):
(In case you are dealing with gigantic arrays, a few performance modifications should be made so things happen more in-place.)
(sorry for the spelling errors, just ignore them ;))