title: Alter number sort / number sequence
body: <p>I have an array / number sequence <code>a=[1,2,3,4,5]</code> and I'm trying
  to create an array / number sequence that looks like <code>a_new</code> below:
  The <strong>columns</strong> represent the orders / index the numbers should go in.</p>
  
  <pre><code>a_new=...
  [1,2,3,4,5;
  2,1,2,3,4;
  3,3,1,2,3;
  4,4,4,1,2;
  5,5,5,5,1]
  </code></pre>
  
  <p>My thoughts where to use <code>circshift</code> but quickly found out that would not work.</p>
  
  <pre><code>a=[1,2,3,4,5];
  for n=1:5
    a_wrong(:,n)=circshift(a(:)',[0 n])(:)
  end
  </code></pre>
  
  <p>produces </p>
  
  <pre><code>a_wrong=[
      5   4   3   2   1
      1   5   4   3   2
      2   1   5   4   3
      3   2   1   5   4
      4   3   2   1   5]
  </code></pre>
  
  <p>Any thoughts? It doesn't need to use <code>circshift</code> if that won't work.</p>
  
  <p>PS: I'm using Octave 4.2 which is similar to Matlab</p>