title: Matlab: Textscan with blank spaces
body: <p>I have a textfile formatted like this:</p>
  
  <pre><code>3,4, ,CMX COP,JUL11,ABCD4,APPM,CME,4PTS09,F,HG,27, , ,1,4.3,2,27,23,1,NCAP1,0
  5,6, ,AUD,JUN11,ABCD4,APPM,CME,4PTS09,F,6A,11, , ,1,1.7,10,27,23,1,NCAP1,0
  </code></pre>
  
  <p>I'm trying to read it with textscan, but I don't know how to deal with the blank spaces. I tried:</p>
  
  <pre><code>filename = 'E:\20110427.csv';
  
  fileid = fopen(filename,'rt');
  Data = textscan(fileid, '%d,%d,%c,%s,%s,%s,%s,%s,%s,%s,%s,%d,%c,%c,%d,%f,%d,%d,%d,%d,%s,%d')
  </code></pre>
  
  <p>The space between CMX and COP seems to be throwing it off, as well as potentially the blanks between the commas. Any suggestions?</p>
  
  <p>CMX COP is one thing. It would be okay to delete the space.</p>