title: Error: `Input argument "N" is undefined`, in simple matlab program
body: <p>I have this tiny program in Matlab. </p>
  
  <pre><code>laMatriz.m
  
  function k = laMatriz(X)
      Y = 9;
      A = zeros(X, Y);    
      for i=1:X
          V = elVector(Y);
          LimY = length(elVector);
          for j=1:LimY
              A(i,j) = V(j); 
          end
      end
      k = A;
  end
  
  
  elVector.m
  
  function elVector = elVector(N)
      %fprintf('largo de elVector %i\n', N);
      elVector=1:N;
  end
  </code></pre>
  
  <p>Calling function laMatriz(10) results in this error:</p>
  
  <pre><code>??? Input argument "N" is undefined.
  
  Error in ==&gt; elVector at 3
      elVector=1:N;
  
  Error in ==&gt; laMatriz at 11
          LimY = length(elVector);
  </code></pre>
  
  <p>why? how can i fix it?</p>