title: How to combine numbers and add up numbers in different column
body: <p>This is continuation of my previous questions (<a href="https://stackoverflow.com/questions/28717837/how-to-count-characters-or-unique-string-in-matlab"><strong>one</strong></a>, <a href="https://stackoverflow.com/questions/28716474/how-to-keep-leading-zeros-by-transforming-array-to-single-numbers"><strong>two</strong></a>) and this is my real problem
  I have an array of data:</p>
  
  <pre><code>a   b   c   d
  0   1   2   5
  0   1   7   1
  0   0   5   5
  0   0   0   1
  0   1   0   2
  </code></pre>
  
  <p>as you can see i want abc to be combine and in one column, just like this:</p>
  
  <pre><code>abc    d
  012    5
  017    1
  005    5
  000    1
  010    2 
  </code></pre>
  
  <p>so i will now have 2 columns abc and d</p>
  
  <p>next i want to count repeated values of d, add it up and combined those corresponding abc, see below</p>
  
  <pre><code>abc        d
  012,005    10
  017,010    2
  010        5
  </code></pre>
  
  <p>so as you can see, 012, and 005 combine because they have the same value of d, and their d add up so it become 10, so how i can do that? this is my real problem please help thanks.    </p>