[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Incrementing an Array

Once again I am struggling with the finer points of IDL.  What I am trying 
to do seems simple, but is causing me some headaches.  What I am trying to 
do is this:

matrix[x,y,z] = matrix[x,y,z] + 1

Where matrix is a 3D array and x,y,z are 1D arrays.  Matrix starts out 
all 0's and I am trying to increment values at elements [x,y,z].  The 
is that some elements should be incremented multiple times.  All the 
proper elements are incremented once, but the second, third, 
fourth....increments are not showing up.  Any ideas?  I know that I could 
write this with loops, but that would be too slow.