title: Interpolating discrete data Matlab
body: <p>I have the data set in relation <strong>z=f(x,y)</strong> where x and y are coordinate points and z are the values with respect to these points.I need to get the z values between the spaces from x and y values. I have tried by doing the interpolation, and still it gives me the almost same results. So, my question is how to get the overall 'z' distribution on the 'xy' surface. Thank you </p>
  
  <pre><code> [X,Y] = ndgrid(linspace(0,100,506),linspace(-85,85,2001));
       Z = griddata(x(:),y(:),z(:),X,Y,'linear');
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/S1P02.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/S1P02.png" alt="enter image description here"></a></p>