title: split a list into several variables in matlab
body: <p>If I have a short list (let's say two or three elements) I would like to have function that split it in several variables. Something like that:</p>
  
  <pre><code>li=[42 43];
  [a b]=split(li)
   --&gt; a=42
   --&gt; b=43
  </code></pre>
  
  <p>I am looking for some way to make my code shorter in matlab. This one would be nice in some situations For instance:</p>
  
  <pre><code>positions=zeros(10,3);
  positions= [....];
  [x y z]=split(max(positions,1))
  </code></pre>
  
  <p>instead of doing:</p>
  
  <pre><code>pos=max(positions,1)
  x=pos(1);
  y=pos(2);
  z=pos(3);
  </code></pre>