title: How to read formatted input in matlab/octave?
body: <p>I plan to read formatted .txt files with 5 columns and organized in the following manner:</p>
  
  <pre><code>0 1:0.007477 2:0.000000 3:1.000000 id:10002 #we = GX008-86-4444840 an = 1 asd = 0.086622
  0 1:0.603738 2:0.000000 3:1.000000 id:10002 #we = GX037-06-11625428 an = 0.0031586555555558 asd = 0.0897452
  0 1:0.214953 2:0.000000 3:0.000000 id:10002 #we = GX044-30-4142998 an = 0.00841930701072746 asd = 0.0999735
  </code></pre>
  
  <p>I plan on reading the content of these files into a matrix where each element will be taken as string. After I successfully read it into a matrix, I plan to use string manipulation functions in octave to remove the unnecessary like id: etc.</p>
  
  <p>However, I am not able to read the file properly. I tried <code>textscan</code>,<code>fscanf</code> and other such commands etc.</p>
  
  <p>For eg: </p>
  
  <pre><code>[sam,count]=fscanf(fid,'%d %*s %*s %*s %*s %*s',[5,inf])
  </code></pre>
  
  <p>returns <code>sam = [] (0x1) ???</code> and <code>count = 0</code>. I am trying to read the documentation on this but its very scantly. Any help will be appreciated. </p>