title: Matlab - Most repeated values in array (not just mode)
body: <p>I have an array with numbers that range from 1 to 4. I need to know which is/are the values that repeat more. In case there's a draw I need to know which are the values so I can make some operations.</p>
  
  <p><strong>Example:</strong></p>
  
  <pre><code>a = [1 1 1 2 2 2 3 4]
  Output = [1 2]
  
  a = [1 1 1 2 3 4]
  Output = 1
  
  a = [1 2 2 3 3 4 4]
  Output = [2 3 4]
  </code></pre>
  
  <p>Any ideas?</p>