title: Matlab repr function
body: <p>In Matlab, one can evaluate an arbitrary string as code using the <code>eval</code> function. E.g.</p>
  
  <pre><code>s = '{1, 2, ''hello''}'  % char
  c = eval(s)              % cell
  </code></pre>
  
  <p>Is there any way to do the inverse operation; getting the literal string representation of an arbitrary variable? That is, recover <code>s</code> from <code>c</code>?
   Something like</p>
  
  <pre><code>s = repr(c)
  </code></pre>
  
  <p>Such a <code>repr</code> function is built into Python, but I've not come across anything like it in Matlab, nor do I see a clear way of how to implement it myself.</p>
  
  <p>The closest thing I know of is something like <code>disp(c)</code> which prints out a representation of <code>c</code>, but in a "readable" format as opposed to a literal code format.</p>