title: How to convert an array of array into a matrix?
body: <p>Suppose I want to apply a vector-valued function <code>phi</code> to a vector <code>x</code>:</p>
  
  <pre><code>phi(x, d) = [x.^i for i=0:d]    # vector-valued function
  x = rand(7)                     # vector
  y = phi(x, 3)                   # should be matrix, but isn't
  </code></pre>
  
  <p>Now <code>y</code> should be a matrix, but it is an <code>4-element Array{Array{Float64,1},1}</code>, i.e. an array of arrays.  Actually, I want <code>y</code> to be a matrix.  Is the implementation of <code>phi</code> wrong?  Or how do I convert it?</p>
  
  <p>Thanks!</p>