title: How we can calculate starting and ending indices of specific string in a cell array in MATLAB?
body: <p>Suppose that we have this cell array:</p>
  
  <pre><code>strings = {'a'; 'a'; 'a'; 'a'; 'a'; 'a'; 'b'; 'b'; 'b'; 'b'; 'm'; 'm'; 'm'; 'm'};
  </code></pre>
  
  <p>I want something like this as the output:</p>
  
  <pre><code>a  1    6
  b  7    10
  m  11   14
  </code></pre>
  
  <p>The numbers are showing the start and ending indices of every unique string. However, this is just an example. My cell array has more than 100 unique strings. What would be an efficient way to do this in MATLAB?</p>