Xyreadr

From Eigenvector Research Documentation Wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Purpose

Reads one or more ASCII XY or XY... files into a DataSet object.

Synopsis

out = xyreadr(file,delim,options)

Description

Reads standard XY ASCII files in which the first column is a column of axisscale values (wavelengths, retention times, etc) and the second and possibly subsequent column(s) are values measured at the corresponding axisscale values. Returns a DataSet object with the first column of the file as the axisscale and all subsequent columns (both in the same file and in multiple files) concatenated and transposed as rows.

It is REQUIRED that, if multiple files are being read, they must all have the same X range. If this is not true, the import may fail.

Inputs

  • file = One of the following identifications of files to read:
a) a single string identifying the file to read
('example.txt')
b) a cell array of strings giving multiple files to read
({'example_a' 'example_b' 'example_c'})
c) an empty array indicating that the user should be prompted to locate the file(s) to read
([])
  • delim = An optional string used to specify the delimiter character.
Supported delimiters include:
  • 'tab' or '\t' or sprintf('\t')
  • 'space' or ' '
  • 'comma' or ','
  • 'semi' or ';'
  • 'bar' or '|'
If (delim) is omitted, the file will be searched for a delimiter common to all rows of the file and producing an equal number of columns in the result.

Outputs

  • out = a DataSet object with the first column of the file(s) stored as the axisscale{2} values and all subsequent column(s) stored as rows of data.

Options:

  • commentcharacter: [''] any line that starts with the given character will be considered a comment and parsed into the"comment" field of the DataSet object. Deafult is no comment character. Example: '%' uses % as a commentcharacter.
  • headerrows: [{0}] number of header rows to expect in the file.
  • waitbar: [ 'off' |{'on'} ] governs use of waitbars to show progress.

See Also

autoimport, areadr, dataset, xclgetdata, xclreadr