comparing arrays
Posted: Sun Jun 26, 2016 10:49 pm
I need some simple code for comparing arrays and getting output with 0/1 values.
example input1:
50
50
50
...
example input2
40
50
120
...
output array: 1 if input1>=input2, else 0
0
1
1
...
Note: basically I will need to extend it into value versus range (to check whether value is within a range specified by two arrays: min and max) and range versus range (to check whether there is a common part between range1 made of min1 and max1 array and range 2 made of min2 and max2 array). Anyone has it perhaps...?
example input1:
50
50
50
...
example input2
40
50
120
...
output array: 1 if input1>=input2, else 0
0
1
1
...
Note: basically I will need to extend it into value versus range (to check whether value is within a range specified by two arrays: min and max) and range versus range (to check whether there is a common part between range1 made of min1 and max1 array and range 2 made of min2 and max2 array). Anyone has it perhaps...?