title: Octave complex element-wise operations
body: <p>Is there a way to write 'complex' element-wise operations in one line, or do we have to separate them into multiple lines?</p>
  
  <p>For example, let us have this mathematical function: 1/(1+e^-x)
  Which I want to calculate for each element on x (x may be a scalar, vector or a matrix).</p>
  
  <p>This is a working code I have written:</p>
  
  <pre><code>function r = sigmoid(x)
      r = zeros(size(x));
      r = e.^(-x);
      r = 1.+r;
      r = 1./r;
  end
  </code></pre>
  
  <p>My question is - can we simplify it to one line?</p>