What is the best way to downsample a tall timetable? Neither "decimate" nor "retime" seems to work.

3 visualizaciones (últimos 30 días)
What is the best way to downsample a tall timetable? Using:
decimate(TT, n);
causes the error "Conversion to logical from tall is not possible." Using:
retime(TT, 'regular', 'mean', 'SamplingRate', n);
causes the error "Invalid parameter name: SamplingRate".

Respuestas (1)

dpb
dpb el 9 de Ag. de 2018
Editada: dpb el 9 de Ag. de 2018
The newTimeStep or newTimes input parameters could be used for the purpose; newTimeStep is a fixed time step so that
newTimeStep=TimeStep*N2/N1; where N1,N2 are the existing, old series lengths or the ratio the decimation factor.
Alternatively, newTimes is a vector of times.
To use decimate you would have to retrieve the data from the time series to a double; the doc doesn't indicate it supports tall arrays, though.

Productos


Versión

R2018a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by