Probably a very simple question. For a single dimension array I can do I. 1 0 1 1 1 0 0 0 1 0 1 0 2 3 4 8 10 to get the nonzero indices. But I am not sure how to do this for a larger dimension. i.e. get the (i,j) or (i,j,k) index of nonzero elements. e.g. for this matrix: arr =. 3 3 $ 1 0 0 0 1 0 0 0 1 I. doesn't work because it only gives me the ith value of the position of the nonzero elements. Any help appreciated. Regards. ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
- [Jprogramming] Getting index in 2+d array Jon Hough
- Re: [Jprogramming] Getting index in 2... robert therriault
- Re: [Jprogramming] Getting index in 2... 'Pascal Jasmin' via Programming
- Re: [Jprogramming] Getting index ... 'Pascal Jasmin' via Programming
- Re: [Jprogramming] Getting index in 2... Brian Schott
- Re: [Jprogramming] Getting index in 2... bill lam
- Re: [Jprogramming] Getting index ... 'Pascal Jasmin' via Programming
- Re: [Jprogramming] Getting index in 2... Dan Bron
- Re: [Jprogramming] Getting index ... 'Pascal Jasmin' via Programming
- Re: [Jprogramming] Getting index ... Raul Miller
- Re: [Jprogramming] Getting index in 2... Raul Miller
