title: Plot square surface in Matlab
body: <p>How to plot a square surface in <code>Matlab</code>?</p>
  
  <p>More exactly I want to plot a square square with value 0.5 surface which is located at X:-1 to X=1 and Y:2.5 to 3.5.</p>
  
  <p>I tried the following</p>
  
  <pre><code>[X,Y] = meshgrid(-3.5:.5:3.5);
  Z = zeros(15);
  Z(end-2:end,5:9) = 0.5;
  surf(X,Y,Z);
  </code></pre>
  
  <p>This doesn't result in a perpendicular edge. How to archive that?</p>