title: Convert vector to circular space with different median
body: <p>I have a vector of 10 random numbers from 1 to 11 (median of the vector 1:11 is 6).</p>
  
  <pre><code>min = 1;
  max = 11;
  nVector = 10;
  VectorRand = randi([min max],1,nVector);
  </code></pre>
  
  <p>I would like to convert the values in <code>VectorRand</code> to a circular array of 11 values, but with a different median. For example, median 2:</p>
  
  <pre><code>-5(8) -4(9) -3(10) -2(11) -1(1) 0(2) +1(3) +2(4) +3(5) +4(6) +5(7)
  Result: 8 9 10 11 1 - 2 - 3 4 5 6 7
  </code></pre>
  
  <p>in the case of VectorRand = [1 3 8 4 6 8 5 2 6 8 10]
      Result: -1 1 -5 2 4 -5 3 0 4 -5 -3</p>
  
  <p>where the median (2 in this case) becomes zero and all the other values are translated in terms of distance from the median (e.g. 8=-5, 9=-4 10=-3 and so on).</p>