tsOut = resample(ts, newTime)
tsOut = resample(ts, newTime, method)
| Parameter | Description |
|---|---|
| ts | Input timeseries object. |
| newTime | New sample times. |
| method | Optional interpolation method: linear, zoh, or nearest. |
| Parameter | Description |
|---|---|
| tsOut | Resampled output timeseries object. |
resample Interpolates data onto a new time vector and updates Time while preserving metadata.
ts = timeseries([1; 2; 3], [10; 11; 12], 'Name', 'speed');
ts2 = resample(ts, [10; 10.5; 11]);
ts2.Data
| Version | Description |
|---|---|
| 2.0.0 | initial version |