Skip to content

SONGetChannel

  SONGETCHANNEL provides a gateway to the individual channel read functions.

  [DATA{, HEADER}]=SONGETCHANNEL(FID, CHAN{, OPTIONS});
  where:
          FID is the matlab file handle
          CHAN is the channel number to read (1 to Max)
          OPTIONS if present, are a set of one or more arguments
                    (see below)

          DATA receives the data or structure from the read operation.
          HEADER, if present, receives the channel header information

  When present, OPTIONS must be the last input argument. Valid options
  are:
  'ticks', 'microseconds', 'milliseconds' and 'seconds' cause times to
     be scaled to the appropriate unit (seconds by default)in HEADER
  'scale' - calls SONADCToDouble to apply the channel scale and offset to DATA
     which will  be cast to double precision
  'progress' - causes a progress bar to be displayed during the read.
  'mat' - the loaded data will be appended to the MAT-file whose name
          is supplied in the next optional input e.g.:
        [d,h]=SONGetADCChannel(fid,5,'progress','mat','myfile.mat');
        In this case, d will be stored in variable chan5.
        Use SONImport in preference to  this option or, better, ImportSMR in
        sigTOOL.

  See also SONIMPORT

  Malcolm Lidierth 02/02
  Updated 06/07 ML
        Error checking now allows Spike for Mac files to be loaded
  Copyright © The Author & King's College London 2002-2006