title: Indexing matrices with four indices in MATLAB
body: <p>The usual way to index elements in a matrix (in MATLAB, at least) is to use two variables (<em>i</em> and <em>j</em>), so a general element matrix can be adressed by M_{i,j}. How can I do the same indexing in a matrix that has four indices, like M_{ij,kl}?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>The elements of a usual matrix A can be viewed as:</p>
  
  <p><img src="https://mathforum.org/mathimages/imgUpload/math/8/b/9/8b9d58ed219ff33e895527a85f833c94.png" alt="matrix"></p>
  
  <p>So a general element is extracted, in MATLAB, using A(n,m). 
  What I want to do is write a matrix that has elements that are indexed like this:</p>
  
  <p><a href="http://bit.ly/1gHRZrR" rel="nofollow noreferrer">matrix2 http://bit.ly/1gHRZrR</a></p>
  
  <p>Is there any way to do this without using cells/arrays, as pointed out in the comments of the question?</p>