title: arrayfun when each row of the array is an input
body: <p>My situation is that I would like to map a scalar array <code>A</code> by a function with handle <code>fun</code> sending a row vector to a row vector, to acquire <code>B</code>, such that <code>B(i,:) = fun(A(i,:))</code>. </p>
  
  <p>The most reasonable solution I could think of looks like:</p>
  
  <pre><code>temp = mat2cell(A,ones(1,size(A,1)),size(A,2));
  B = cell2mat(cellfun(fun,temp,'UniformOutput',0));
  </code></pre>
  
  <p>However, the conversion to cells and back seems like overkill (and is assumably computationally expensive). It is also not clear to me why cellfun complains about non-uniform output. Does a more efficient way jump to mind?</p>