ccc_cropData


Custom Channel Configuration Function: ccc_cropData


Description:

Crops numeric and nonscalar input data at defined positions

with the following crop base options:

   - Samples (1 based indexing)

   - Time (only works when time channel "inData.Time" is provided)


NOTE: INPUT CHANNELS MUST HAVE THE SAME NUMBER OF ELEMENTS (RESAMPLED)!


Syntax:  crData = ccc_cropData(inData, pStart, pStop, base)


Inputs:

   inData  [1x1 struct] input data (according to OUT_DATA from

                        custom channel configuration)

   pStart  [1x1 double] crop start position (set to NaN to disable start cropping)

   pStop   [1x1 double] crop stop position (set to NaN to disable stop cropping)

   base    [char]       defines the cropping base: 'sample' or 'time'

                           when 'sample': sample based cropping

                           when 'time':   time based cropping


Outputs:

   crData  [1x1 struct] cropped input data