I made a small test with the following line of codes
a= transpose(indgen(10))
help,a
Output is A INT = Array[1, 10] (with values going from 0 to 9)
If I look for the max index on the full array:
test=max(a,location)
print,array_indices(a,location)
The output is 0 9
If I now look for the MAX of the first 5 elements of the array
test= max(a[0:4],location)
print,array_indices(a,location)
The output is 0 4, which seems correct
Do you see a different result ?
|