title: MATLAB: Merging two similar Text fields
body: <p>I have two arrays with similar text field, county and state. I need to merge these two arrays based on common county and state information. A simple example is shown here:</p>
  
  <pre><code>A = [Alabama    Chambers    36571
       Alabama    Cherokee    24006
       Alabama    Cherokee    24006
       Alabama    Jackson     53979
       Alabama    Jefferson   662033]
  
  B = [2397530 -85.448 34.202 -86 35  Cherokee  Alabama
       2423130 -86.599 33.622 -86 33  Jefferson Alabama
       2423398 -86.576 33.524 -86 33  Jefferson Alabama
       2423496 -86.784 33.369 -86 33  Jefferson Alabama
       2455980 -86.696 33.711 -86 33  Jefferson Alabama
       2457595 -86.868 33.597 -86 33  Jefferson Alabama
       2458450 -86.879 33.518 -86 33  Jefferson Alabama];
  </code></pre>
  
  <p>Resulting third matrix:</p>
  
  <pre><code>C = [2397530 -85.448 34.202 -86 35  Cherokee Alabama  24006
       2423130 -86.599 33.622 -86 33  Jefferson Alabama 662033
       2423398 -86.576 33.524 -86 33  Jefferson Alabama 662033
       2423496 -86.784 33.369 -86 33  Jefferson Alabama 662033
       2455980 -86.696 33.711 -86 33  Jefferson Alabama 662033
       2457595 -86.868 33.597 -86 33  Jefferson Alabama 662033
       2458450 -86.879 33.518 -86 33  Jefferson Alabama 662033];
  </code></pre>