title: Surf error on data dimensions
body: <p>I thought I had built an error-free code but it seems not, and I'm quite puzzled as why. My matrixes A, B and C contains values in a 64x64 matrix (may change size depending on the run, but they all have the same constant size in one run).</p>
  
  <pre><code>s = size(A)
  
  figure(1)
  set(gcf, 'renderer', 'zbuffer');
  quiver(1:s(2),1:s(1),A,B);
  hold on;
  pcolor(1:s(2),1:s(1),C);
  
  figure(2)
  surf(s(2),s(1),A);
  
  figure(3)
  surf(s(2),s(1),B);
  
  figure(4)
  surf(s(2),s(1),C);
  </code></pre>
  
  <p>It says </p>
  
  <pre><code>Error using surf (line 78)
  Data dimensions must agree
  </code></pre>
  
  <p>I tried using size(A) to verify, and it is 64x64, and s(1) = 64 and s(2) =64.</p>
  
  <p>I placed s(2) before s(1) because for some reason surf applies the row dimension on the column of the third argument (I'm quite puzzled by this, but it is not an issue anyway).</p>
  
  <p>If you want to see : <a href="http://www.mathworks.com/help/matlab/ref/surf.html" rel="nofollow">http://www.mathworks.com/help/matlab/ref/surf.html</a> in surf(X,Y,Z) description.</p>