title: matlab - two variables least squares function approximation
body: <p>I have a function of two variables of the type: y = f(x1,x2) to be approximated and I would like to use least squares method to do it.</p>
  
  <p>Polyval and Polyfit work with two-dimensional function, here I need to solve a three-dimensional function.</p>
  
  <p>Thanks in advance.</p>
  
  <p>G.B. </p>