title: Merging two three column matrices: uniques in cols 1&2, maximum in col 3
body: <p>I have two matrices:</p>
  
  <pre><code>a = [ 1 10 20; 2 11 22; 3 12 34; 4 13 12];
  b = [ 3 12 1;  4 13 25; 5 14 60; 6 15 9 ];
  </code></pre>
  
  <p>I want to merge them into a single matrix where the rows with the maximum in column 3 used where columns 1 and 2 are identical, i.e. the resulting matrix should look like this:</p>
  
  <pre><code> c = [ 1 10 20; 2 11 22; 3 12 34; 4 13 25; 5 14 60; 6 15 9];
  </code></pre>
  
  <p>Any suggestions how to do this easily in MATLAB would be greatly appreciated. I've banged my head on a wall trying to use <code>intersect</code> but to no avail.</p>