ccc_correctInterrupts
Custom Channel Configuration Function: ccc_correctInterrupts
Description:
This function corrects samples, where specific channels are zero at
the same time. Those gaps will be correted using interpolation within
all numeric and nonscalar channels.
NOTE: INPUT CHANNELS MUST HAVE THE SAME NUMBER OF ELEMENTS (RESAMPLED)!
Syntax: crData = ccc_correctInterrupts(inData, startCor, stopCor, [method], [channel0])
Inputs:
inData [1x1 struct] input data (according to OUT_DATA from
custom channel configuration)
startCor [1x1 double] time in s to correct before the disconnect
stopCor [1x1 double] time in s to correct after the disconnect
(e.g. realignment errors)
method [1xN char] [optional] Interpolation method, specified
as a string from the list below.
- 'linear'(default)
- 'nearest'
- 'next'
- 'previous'
- 'pchip'
- 'cubic'
- 'spline'
For further details, see MATLAB's documentation.
channel0 [1xN cell] [optional] cell array of strings containing
the names of numeric channels to be observed
for zero conditions at the same time.
If not specified, the following
channels will be observed:
- dXTarget
- VelHunter
This option requires the inerpolation
method to be also specified!
Outputs:
crData [1x1 struct] corrected data