title: The function contour has different outputs in Scilab than in MATLAB?
body: <p>I'm trying to convert this Matlab code to Scilab, but I have some problems.</p>
  <pre class="lang-matlab prettyprint-override"><code>clear all; clc;
  c0  =  0.8;
  c1  =  1.3;
  c11 = -6.1;
  c12 = -0.6;
  c2  =  1.7;
  c22 = -1.7;
  g = 0.05; 
  d = 0.01; 
  x1 = -9; 
  x2 = 8; 
  k = 1;  
  kmax = 100; 
  x1trace = [x1]; 
  x2trace = [x2]; 
  i = 2;
  
  while k &lt; kmax 
      gr1 = c1 + c12*x2 + 2*c11*x1; 
      x1 = x1 + g*gr1
      x1trace(i) = x1; 
      x2trace(i) = x2;
      i = i + 1; 
      gr2 = c2 + c12*x1 + 2*c22*x2; 
      x2 = x2 + g*gr2
      x1trace(i) = x1; 
      x2trace(i) = x2; 
      i = i + 1; 
      if sqrt(gr1^2 + gr2^2) &lt;= d; 
          break; 
      end
      k = k + 1; 
  end
  
  x = -10:0.1:10; 
  y = -10:0.1:10; 
  [X, Y] = meshgrid(x, y); 
  Z = c0 + c1*X + c2*Y + c12*X.*Y + c11*X.^2 + c22*Y.^2; 
  [C, h] = contour(X, Y, Z); 
  clabel(C, h); 
  
  hold on;
  plot(x1trace, x2trace, '-'); 
  text(x1trace(1) + 0.2, x2trace(1) + 0.5, 'M0'); 
  text(x1 + 2, x2, ...
  strvcat(['x1 = ' (num2str(x1))], ...
          ['x2 = ' (num2str(x2))], ...
          ['k = '  (num2str(k))])); 
  hold off;
  </code></pre>
  <p>I get an error for this line:</p>
  <blockquote>
  <p>[C, h] = contour(X, Y, Z);<br />
  Wrong number of output arguments.</p>
  </blockquote>
  <p>What should I change to fix it? Are there also any other errors in the code ?</p>