title: Replace strings with integer IDs in a Cell - Matlab
body: <p>I have a cell that has string IDs.  I need to replace them with integer IDs so that the cell can be transformed into a matrix.  I especially need this to be a vectorized operation as the celldata is huge.  </p>
  
  <p><code>celldata =  { 'AAPL' [0.1] ; 'GOOG' [0.643] ; 'IBM' [0.435] ; 'MMM' [0.34] ; 'AAPL' [0.12] ; 'GOOG' [1.5] ; 'IBM' [0.75] ; 'AAPL' [0.56] ; 'GOOG' [0.68] ; 'IBM' [0.97] ; };</code></p>
  
  <p>I designed a sequential intID: </p>
  
  <p><code>intIDs = {'AAPL' [1] ; 'GOOG' [2] ; 'IBM' [3] ; 'MMM' [4]};</code></p>
  
  <p>intIDs contain ALL IDs that are possible in celldata.  Also, celldata has IDs in sequential order and grouper together by dates.  The date column is not shown here.</p>
  
  <p>Desired result: </p>
  
  <p><code>celldata = {[1] [0.1] ; [2] [0.643] ; [3] [0.435] ; [4] [0.34] ; [1] [0.12] ; [2] [1.5] ; [3] [0.75] ; [1] [0.56] ; [2] [0.68] ; [3] [0.97] ;};</code></p>
  
  <p>Thanks!</p>