title: How to read line from a text file as a string in matlab?
body: <p>I am trying to read a text file in MATLAB which has a format like the following. I am looking to read the whole line as a string. </p>
  
  <pre><code> 2402:0.099061 2404:0.136546 2406:0.447161 2407:0.126333 2408:0.213803 2411:0.068189
  </code></pre>
  
  <p>I tried couple of things. </p>
  
  <p><code>textscan(fid, '%s')</code> reads the line but splits the line into cells at spaces.</p>
  
  <p><code>fscanf(fid, '%s')</code> reads the line as a string but removes all the spaces.</p>