[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Incrementing an Array
- Subject: Incrementing an Array
- From: s007amf(at)news.wright.edu (ALAN FRAZIER)
- Date: 27 Apr 2001 20:57:01 GMT
- Newsgroups: comp.lang.idl-pvwave
- Organization: Wright State University, Dayton, Ohio 45435
- Xref: news.doit.wisc.edu comp.lang.idl-pvwave:24730
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
problem
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.
Thanks,
Alan