SDIMPORT Import data from a text file DATA=SDIMPORT(FILENAME,options) INPUTS FILENAME String filename of the text file OPTIONS 'header',I Import feature names (featlab) from the row I 'skip',N Skip N first rows, start reading data after 'data',I Specify column indices I for data matrix of SDDATA object 'lab',I Specify column index I for labels 'matrix',I Specify column index I for numerical matrix 'columns',C Provide cell array C with field name and column indices. 'delimiter' Field separator (default: ',') OUTPUT DATA Output SDDATA,SDLAB object or matrix EXAMPLES Import data from comma-separated file: d=sdimport('data.txt') Specify columns for data matrix and for labels, return sddata d=sdimport('data.txt','data',1:5,'lab',6) Specify multiple fields (person field is read as string) d=sdimport('data.txt','skip',1,'columns',{'data',3:10,'lab',1,'S:person',2}) DESCRIPTION SDIMPORT creates SDDATA object from a text file with samples stored in rows and features in columns. SDIMPORT assumes comma-separated file (separating characted may be set using 'delimiter' option). SDIMPORT assumes that all columns represent features in the data matrix. Option 'data' may specify column subset and option 'lab' may point to column with sample labels. Additional data properties may be specified using 'columns' option. It should be followed with a cell array with field names and column indices. Prefix of the field name may specify the field type (default is numeric, other options are 'L:' for labels, 'S:' for string array and 'C:' for cell array). SEE ALSO SDEXPORT