title: Is it possible to specify both range and header in Scilab's csvRead?
body: <p>The Scilab documentation for <a href="https://help.scilab.org/docs/5.5.0/en_US/csvRead.html" rel="nofollow noreferrer">csvRead</a> indicates that it is possible to both specify a range (from row,col to row,col) and the number of header rows to ignore.  However I can only seem to do one at a time.</p>
  <p>This is what I am doing (based on one of the examples in the documentation; using Scilab 5.5.0).  First, create a CSV file to read back:</p>
  <pre><code>    CSV = [&quot;1,0,0,0,0&quot;; 
      &quot;0,1,0,0,0&quot;;
      &quot;0,0,1,0,0&quot;; 
      &quot;4,4,1,2,0&quot;; 
      &quot;4,63,1,2,0&quot;;
      &quot;4,63,1,4,233&quot;;
      &quot;42,3,23,2,23&quot;;
      ];
      filename = fullfile(TMPDIR , 'foo.csv');
      mputl(CSV, filename);
  </code></pre>
  <p>Now read back the data from row 2, col 1 to row 5, col 4:</p>
  <pre><code>    csvRead(filename, [], [], &quot;double&quot;, [], [], [2 1 5 4])
  </code></pre>
  <p>This gives the result</p>
  <pre><code>    ans  =
  
      0.    1.     0.    0.  
      0.    0.     1.    0.  
      4.    4.     1.    2.  
      4.    63.    1.    2.  
  </code></pre>
  <p>Now suppose I want to skip the first line in my CSV file (it might have some unimportant header information in it).  I would write:</p>
  <pre><code>    csvRead(filename, [], [], &quot;double&quot;, [], [], [], 1)
  </code></pre>
  <p>Which gives the result</p>
  <pre><code>    ans  =
  
      0.     1.     0.     0.    0.    
      0.     0.     1.     0.    0.    
      4.     4.     1.     2.    0.    
      4.     63.    1.     2.    0.    
      4.     63.    1.     4.    233.  
      42.    3.     23.    2.    23.   
  </code></pre>
  <p>All good so far.  If I want to skip the first line AND only store part of the matrix, I presumed I could write:</p>
  <pre><code>    csvRead(filename, [], [], &quot;double&quot;, [], [], [2 1 5 4], 1)
  </code></pre>
  <p>But this gives the same answer as before, i.e. only the header line is removed and the range is ignored:</p>
  <pre><code>    ans  =
  
      0.     1.     0.     0.    0.    
      0.     0.     1.     0.    0.    
      4.     4.     1.     2.    0.    
      4.     63.    1.     2.    0.    
      4.     63.    1.     4.    233.  
      42.    3.     23.    2.    23.   
  </code></pre>
  <p>Is it possible to specify both a range and a header?  I only tinker with Scilab so may be missing something obvious.</p>