readcxdata()

res = readcxdata( filename [, verbose, nchans] ), where:

filename: A string containing the pathname for the Maestro (or Cntrlx) data file to be processed. This can be an absolute path or a path relative to the current working directory.

verbose: If nonzero, detailed progress messages are written to the Matlab console window. This is typically used only for debugging purposes.

nchans: For headerless Continuous-mode data files (generated by Cntrlx versions dated before 29 Jan 2002), the function must know how many analog data channels were recorded to properly parse the compressed analog data stored in the file. If an incorrect value is specified, then the decompressed analog data will be invalid.

This function reads a single Maestro data file and stores the data and information extracted from the file in a Matlab structure. Researchers use readcxdata() heavily in their own Matlab scripts to analyze results across the data files recorded over the course of an experiment. In addition to providing access to the data file's header and recorded analog and digital event data, the function also computes the trajectories of all targets that participated in a trial (Trial-mode files only), and it reports the content of any analysis action records appended to the data file by JMWork. It is a compiled MEX function written in C -- which is critical to performance: if it was written as a standard M-function using Matlab functions to access file contents, it would run much too slowly.

The table below describes the fields of the Matlab data structure res that is returned by readcxdata(). If it encounters any serious problems while reading and parsing the specified data file (e.g., the file pathname is incorrect, or the file format is unrecognized), the function prints an error message to the Matlab command console and aborts. In this case, all or some of the fields in this output structure will be empty matrices. [NOTE: In the table "JM/X/MWork" refers to JMWork and its predecessors, XWork and MWork.]