title: Finding tensor indices
body: <p>I am building a 5-d tensor which explores a function in a 5-D space. The tensor is just the values of the function in discrete points in the space.</p>
  
  <p>But, whenever I get the value, I want to get the indices of tensor / coordinate of space for later visualization. I tried to construct linspace-s for particular dimensions, then do a "sort of tensor exterior product". When I call the indices, I get the coordinate. It didn't work.</p>
  
  <p>I hope I can get the indices with the value of the tensor at those indices, so I can rescale the indices into my coordinate. Is there such a function?</p>
  
  <p>For example - 
  A = </p>
  
  <pre><code>1 2 3
  4 5 6
  7 8 9
  </code></pre>
  
  <p>For visualization, I want to plot A(:,2), a slice at fixed column. The coordinates are (1,2),(2,2),(3,2).
  I want to plot f = (2,5,8) with coordinate = (1,2,3)
  But now I have to generalize it into 5 dimensions and extract data for 2D colour plot (fix the other 3 dimensions)</p>