title: textscan in MATLAB: read NULL value as NaN
body: <p>I have a .txt file with the following data:</p>
  
  <h3>sampleF.txt --> (tab delimited)</h3>
  
  <pre><code>MSFT    200    100
  APPL    10    NULL
  AMZN    20    40
  </code></pre>
  
  <p>I need to read this data using <code>textscan</code>. I am facing a problem while reading the <code>NULL</code> data. Using <code>treatasempty</code> param, I can read it as 0. But I want to read it as <code>NaN</code>. Please help!  Thanks!</p>
  
  <pre><code>fName = '.....\sampleF.txt'
  [fid, message] = fopen(fName) ;
  if fid &lt; 0, disp(message), else
      datatxt = textscan(fid, '%q %d %d', 'Delimiter', '\t','treatAsEmpty','NULL');
      datatxt = [ datatxt {1} num2cell(datatxt {2}) num2cell(datatxt {3})] ;
      fclose(fid) ; 
  end
  
  %datatxt = { 'MSFT' [200] [100] ; 'AAPL' [10] [NaN] ; 'AMZN' [20] [40] } 
  </code></pre>