csvread
Read an array from a file containing comma separated numeric data.
(u)=csvread(file, begrow,begcol)
(u)=csvread(file, range)
Inputs
file The name of the file.
begrow The (zero-based) index of the first row to read.
begcol The (zero-based) index of the first column to read.
range The (zero-based) range of the data to read, either is four integers in the form [begrow, begcol, endrow, endcol] , or is spreadsheet-like specification of indices in a string of the form A1BB2 , that is, with columns specfied in by letters [A B ...AA AB AC ...] and rows specified by numbers.
Outputs
u The array read from the given file.


Example
>>showfile('csvtest.d')
#skip
#skip
2,3,4,20
5,6,7,50
8,9,10,81
40,41,390.e2,-91
.9826e-2,9,10.34,81
88,99,102,81.536
>>a=csvread('csvtest.d',[2,0,8,2])
>>format medium e
>>a
      2.0000e+000      3.0000e+000      4.0000e+000
      5.0000e+000      6.0000e+000      7.0000e+000
      8.0000e+000      9.0000e+000     10.0000e+000
      4.0000e+001      4.1000e+001      3.9000e+004
      9.8260e-003      9.0000e+000      1.0340e+001
      8.8000e+001      9.9000e+001      1.0200e+002

>>a=csvread('csvtest.d','A3D5')
>>a
          2          3          4         20
          5          6          7         50
          8          9         10         81