title: MATLAB: Make matrix from two variables and plot contour from third variable
body: <p>I have 3 variables (<code>x</code>, <code>y</code>, <code>z</code>) each in a 192x1 vector. The data is all random and sometimes has missing values (NaNs).
  I would like to plot variable <code>c</code> against the other two variables <code>x</code> and <code>y</code> as contour plot (<code>x</code> on the x-axis, <code>y</code> on the y-axis, and <code>z</code> making up the contour lines).</p>
  <p>My biggest problem is making up the 192x192 matrix for <code>x</code> and <code>y</code> because <code>x</code> and <code>y</code> consist of random data. I have tried to use GRIDDATA, Delaunay, and TriScatteredInterp but they did not work because I have NaNs in my data.
  Does anyone know what I can do? If there was a way that I could return the matrix of <code>x</code> vs <code>y</code> from the scatter plot of <code>x</code> and <code>y</code> then my problem would be solved.</p>
  <h3>Example code</h3>
  <pre><code>x=rand(192,1);
  y=rand(192,1);
  z=rand(192,1);
  
  [X,Y]=meshgrid(x,y);
  contour(X,Y,z);
  </code></pre>
  <blockquote>
  <p>??? Error using ==&gt; contour at 74
  Z must be size 2x2 or greater.</p>
  </blockquote>