title: find if an element of 1 array is present in another array without sorting
body: <p>I have 1 vector representing some of the days of a week</p>
  
  <pre><code>daysweek = [5 6 7 1 2 3]; % (1 = sunday,  2= monday,..., 7 = saturday)
  </code></pre>
  
  <p>I want to count how many sundays, mondays etc are present in my vector.</p>
  
  <p>What I do is define a vector: </p>
  
  <pre><code>uniquedays = [1 2 3 4 5 6 7];%sorted so I can use hist
  </code></pre>
  
  <p>count how many instances present in my original vector "daysweek" exists in uniquedays.</p>
  
  <pre><code>countdays = hist(daysweek, uniquedays);
  </code></pre>
  
  <p>countdays will be then <code>1 1 1 0 1 1 1.</code></p>
  
  <p>My problem is that I would like to have countdays with the first element referring to Monday and not to Sunday so it should be <code>1 1 0 1 1 1 1</code> (like if uniquedays is 2 3 4 5 6 7 1)</p>
  
  <p>Thanks</p>