I have a three dimensional matrix, in which are randomly distributed ones. A one represents a particle at that position. So, for instance, if the 3D matrix is A, then A(1,3,8)=1 means that the point x=1, y=3, and z=8, there is a particle. What I would like to do is plot the matrix A. So, what I figured I would do is find the indices of the ones in the matrix A, and then plot the indices in space. However, I all of the matlab functions I have come across only give the linear index, which is not what I want.
How can I accomplish this?