Skip to content

subsref

  SUBSREF method overloaded for adcarray objects.

  READING ADCARRAY PROPERTIES:
  adcarray objects can be read or passed as though they were simple double
  precision matrices using the '()' subscriptor. Thus,
  obj(), obj(1:10), obj(2,1:5,10:20) etc return double precision
  results after applying the scale and offset to the appropriate elements
  of obj.Map.Data.Adc and transforming them via obj.Func. Data will be byte
  swapped first if necessary i.e.
        obj(...) is equivalent to:
        if obj.Swapbytes==true
            obj=swapbytes(obj.Map.Data.Adc(...));
        else
        obj=func(double(obj)*obj.Scale+obj.DC)
    or
        obj=Func{1}(double(obj)*obj.Scale+obj.DC, obj.Func{2:end})
    if func is a cell array (help adcarray for details)

  It follows that you can not use '()' syntax to access arrays of
  adcarrays e.g. x(2)=adcarray() is invalid (although you can access cell
  arrays of adcarrays).

 -------------------------------------------------------------------------
  CHANGE: 23.12.06
  The following exception has been introduced:
  If the adcarray object contains a vector, the obj(:) syntax returns the
  object as an adcarray containing a column vector. This allows us to
  maintain the advantage of the adcarray memory mapping in MATLAB supplied
  functions that call, e.g., x=x(:) to ensure that x is aligned as a column
  vector

  On a 2D or higher matrix, obj(:) still returns a double matrix
 -------------------------------------------------------------------------
  Examples:
  A=OBJ();
  A=OBJ(1:10);
  A=FUNCTION(OBJ());

  Field access with '.'  works as with other objects e.g.
  obj.Map.Data.Adc returns the stored result in its native class.

  Subscription of fields using '()' also works normally, thus
        a=obj.Map.Data.Adc(1:10)
  returns the first 10 elements of data (in the native format without
  scaling etc.).

  obj without subscription assigns/passes the object see ADCARRAY/SUBSASGN
  for further details [e.g. A=FILTFILT(OBJ);]

  obj at the command prompt displays a summary of the contents of obj

  See also ADCARRAY/SUBSASGN, ADCARRAY/GET

  Author: Malcolm Lidierth
  Copyright © The Author & King's College London 2006-

  Revisions
  23.12.06 obj(:) exception handling for vectors introduced
  27.09.07 See within
  15.30.08 Add byte swapping when accessing the memmapfile data directly
                as Map.Data.Adc(...)