title: MATLAB not enough input arguments
body: <p>I keep trying to run this and have no idea what is going wrong. I have it saved as test.m. I click run in the editor and in the matlab command window, it states not enough input arguments. I feel like I am missing something totally obvious, but I cannot spot the issue. </p>
  
  <pre><code>function y = test(A, x)
      %This function computes the product of matrix A by vector x row-wise
      % define m number of rows here to feed into for loop
      [ma,na] = size(A);
      [mx,nx] = size(x);
      % use if statement to check for proper dimensions
      if(na == mx &amp;&amp; nx == 1)
          y = zeros(ma,1);   % initialize y vector 
          for n = 1:ma
              y(n) = A(n,:)*x;
          end
      else
         disp('Dimensions of matrices do not match')
         y = [];
      end
  end
  </code></pre>