title: Matlab: Easy way of getting the standard basis vectors?
body: <p>It seems like this should be easy, but I'm no expert and google isn't helping.</p>
  
  <p>I would like an elegant way in Matlab of producing the standard ordered basis vectors for an n-dimensional space. For example, behaviour similar to the following:</p>
  
  <pre><code>&gt;&gt; [e1, e2] = SOB(2);
  &gt;&gt; e1
  
    e1 =    1     0
  
  &gt;&gt; e2
  
    e2 =    0     1
  </code></pre>
  
  <p>I'm <em>hoping</em> for a 1-liner and don't really want to write a function for something so simple.</p>
  
  <p>Thanks</p>