title: MATLAB plot part of surface
body: <p>Say I have the following script:</p>
  
  <pre><code>u = -5:.2:5;
  [X,Y] = meshgrid(u, u);
  Z = cos(X).*cos(Y).*exp(-sqrt(X.^2 + Y.^2)/4);
  surf(X,Y,Z);
  </code></pre>
  
  <p>Is there anyway that I can make MatLab plot only parts of the surface?  Say, for instance, I just want to plot a single point, or a single grid, what can I do?  I thought perhaps to plot a single point I could use:</p>
  
  <pre><code>surf(X(1,1), Y(1,1), Z(1,1))
  </code></pre>
  
  <p>But then I get the error message:</p>
  
  <pre><code>??? Error using ==&gt; surf at 78
  Data dimensions must agree.
  </code></pre>
  
  <p>I would really appreciate some input/help here. Thanks in advance :)</p>