title: Error: surf plot: Z must be a matrix, not a scalar or vector
body: <p>I want to have a 2-D color map plot, with following code, but it keeps returning me this error, could anyone help me</p>
  
  <pre><code>x = 0:100:600;
  
  z = 0:100:600;
  
  [X,Z] = meshgrid(x,z);
  
  for z2 = 3:5;
  
      for x2 = 3:5
          E1 = Z(z2);
          E2 = X(x2);
          E = E1 +E2;
      end
  end
  
  
  
  figure;
  
  surf(X,Z,E,'EdgeColor','None');
  
  view(2);
  
  xlabel('x','fontsize',20);
  
  ylabel('z','fontsize',20);
  
  colormap jet;
  </code></pre>