title: How to slice a 3D matrix in matlab getting an array
body: <p>Consider having a 3D matrix in matlab where</p>
  
  <pre><code>A(:,:,1) = [1 2 3;4 5 6;7 8 9];
  A(:,:,2) = [11 22 33;44 55 66;77 88 99];
  A(:,:,3) = [111 222 333;444 555 666;777 888 999];
  </code></pre>
  
  <p>Well when I ask for</p>
  
  <pre><code>A(1:end,1,:)
  </code></pre>
  
  <p>I get three different answers:</p>
  
  <pre><code>A(1:end,1,1) = [1 2 3];
  
  A(1:end,1,2) = [11 22 33];
  
  A(1:end,1,3) = [111 222 333];
  </code></pre>
  
  <p>I want to get this in one instruction possibly without cycles and so on:</p>
  
  <pre><code>[1 2 3;11 22 33;111 222 333]
  </code></pre>
  
  <p>How to get it?</p>
  
  <p>I want a new matrix not a series of vectors.</p>
  
  <p>Thankyou.</p>