title: parse a fractional number into matlab from a configuration file
body: <p>In a matlab program I have an external parameter file that needs to be read in. Like</p>
  
  <pre><code>a = 1/3
  b = 'test'
  </code></pre>
  
  <p>Currently I use <code>textscan</code> to read this file and use <code>str2num</code> to parse the values of <code>a</code>. However, I read that <code>str2num</code> use <code>eval</code> inside, which is undesirable for safety reason: what if someone made <code>a = 'delete something'</code>, and then <code>str2num</code> will execute the string as a side effect.  <code>str2double</code> does not work for fractional numbers. Is there any better way to parse <code>1/3</code> from external file into matlab?</p>