Rdareadr: Difference between revisions

From Eigenvector Research Documentation Wiki
Jump to navigation Jump to search
No edit summary
Line 33: Line 33:
Input 'options' is an options structure containing the following fields
Input 'options' is an options structure containing the following fields
*'''waitbar''': <tt>[ 'off' |{'on'}]</tt> Governs display of a progress bar when doing multiple file reading.
*'''waitbar''': <tt>[ 'off' |{'on'}]</tt> Governs display of a progress bar when doing multiple file reading.
* '''nonmatching''': [ 'error' |{'matchvars'} |'cell'] governs behavior when multiple files are being read which cannot be combined due to mismatched types, sizes, etc.
* '''nonmatching''': <tt>[ 'error' |{'matchvars'} |'cell'] </tt> governs behavior when multiple files are being read which cannot be combined due to mismatched types, sizes, etc.
** 'matchvars' returns a dataset object,
** 'matchvars' returns a dataset object,
** 'cell' returns cell (see Outputs,),  
** 'cell' returns cell (see Outputs,),  

Revision as of 10:31, 13 August 2019

Purpose

Reads a RDA file into a DataSet object.

Synopsis

data = rdareadr(filename,options)

Description

Input is the filename of a RDA file to read. If omitted, the user is prompted for a file.

This importer was created by referencing the work done by Chen Chen at the Sir Peter Mansfield Imaging Centre (SPMIC) at the University of Nottingham.

Multiple input files must contain the same axisscale for the wavelength (variables) mode. The imported files are returned in a Dataset Object. The RDA file header information will be stored in .userdata field.

Optional Inputs

  • filename = specifies the file(s) to read using:
(a) a string specifying a single file to read
(b) a cell array of strings specifying multiple files to read
If filename is an empty string or matrix or is not supplied, the user is prompted to identify file(s) to load.
  • options = an optional options structure. See Options below.

Outputs

  • data = takes one of two forms:
  1. If input is a single file, or multiple files containing data that can be combined (same number of data points, same x-axis range, same type of data), the output is a dataset object,
  2. If the input consists of multiple files containing data that cannot simply be combined (different number of data points, differing x-axis ranges, etc), the output is either:
a) a cell array with a dataset object for each input file if the 'nonmatching' option has value 'cell', or
b) a dataset object containing the input data combined using the MATCHVARS function if the 'nonmatching' option has value 'matchvars'.

Options

Input 'options' is an options structure containing the following fields

  • waitbar: [ 'off' |{'on'}] Governs display of a progress bar when doing multiple file reading.
  • nonmatching: [ 'error' |{'matchvars'} |'cell'] governs behavior when multiple files are being read which cannot be combined due to mismatched types, sizes, etc.
    • 'matchvars' returns a dataset object,
    • 'cell' returns cell (see Outputs,),
    • 'error' gives an error.

See Also

Data Importing Formats, spcreadr, writespc, xclreadr, jcampreadr