title: linear indexing for cell array elements in matlab
body: <p>Consider the following cell array:</p>
  
  <pre><code>A={1:3,[20,40],100}
  
  A =
  
  1×3 cell array
  
     {1×3 double}    {1×2 double}    {[100]}
  </code></pre>
  
  <p>I'd like a way to retrive the linear index of the values stored it, for example if I flatten the array using: </p>
  
  <pre><code>[A{:}]
  
  ans =
  
       1     2     3    20    40   100
  </code></pre>
  
  <p>I can see that the 4th linear index is <code>20</code> etc. So is there a way similar the matrix linear index that will give me for a cell array <code>A((4))</code> the value <code>20</code> in the example? (I of course just invented the <code>(())</code> notation for illustration purposes.</p>