is an option for functions such as TimeSeries, TemporalData and MovingMap that specifies how values in between given times should be computed.
ResamplingMethod
is an option for functions such as TimeSeries, TemporalData and MovingMap that specifies how values in between given times should be computed.
Details
- ResamplingMethod is typically used to specify how to resample a time series.
- Typical settings include:
-
Automatic pick the resampling method automatically None use Missing[…] "LinearInterpolation" use linear (order 1) interpolation "PreviousElement" use the previous element "NextElement" use the next element "NearestElement" use the closest element {"Constant",c} use the value c {"Interpolation",InterpolationOrderorder} use interpolation with the specified order - TimeSeries does not admit None as a ResamplingMethod value.
Examples
open all close allBasic Examples (3)
By default, values at intermediate times in a TimeSeries are computed using linear interpolation:
ts1 = TimeSeries[{0, 1, 3, 2, 6, 2, 5}]ts1[1.5]Use second-order interpolation:
ts2 = TimeSeries[{0, 1, 3, 2, 6, 2, 5}, ResamplingMethod -> {"Interpolation", InterpolationOrder -> 2}]Plot[{ts1[t], ts2[t]}, {t, 0, 6}]Treat values in between the given timestamps as Missing objects:
TemporalData[{Subscript[x, 1], Subscript[x, 2], Subscript[x, 3], Subscript[x, 4]}, {{2, 4, 6, 8}}, ResamplingMethod -> None]%[Range[2, 8]]["Domain"]Use a constant value c in between the given timestamps:
TimeSeries[{Subscript[x, 1], Subscript[x, 2], Subscript[x, 3], Subscript[x, 4]}, {{2, 4, 6, 8}}, ResamplingMethod -> {"Constant", c}]%[Range[2, 8]]//NormalScope (1)
ResamplingMethod specifies how to upsample a TimeSeries using TimeSeriesResample:
ts = TimeSeries[{{1, -0.55}, {2, 0.58}, {3, 0.04}, {4, 0.98}, {5, -0.07}, {6, 0.91}, {7, -0.91}, {8, 0.468}, {9, -0.283}, {10, -0.029}}]Resample with a step of 1/2 with interpolation of order 0:
ts0 = TimeSeriesResample[ts, 1 / 2, ResamplingMethod -> {"Interpolation", InterpolationOrder -> 0}]ts2 = TimeSeriesResample[ts, 1 / 2, ResamplingMethod -> {"Interpolation", InterpolationOrder -> 2}]Show[ListPlot[ts, PlotStyle -> PointSize[.04]], ListLinePlot[{ts0, ts2}]]Properties & Relations (2)
For EventSeries, the default ResamplingMethod is None:
es = EventSeries[TimeEventSeries`TimestampData[Association["UniformlySpacedQ" -> True, "Count" -> 5,
"Endpoints" -> TabularColumn[Association["Data" -> {{1, 5}, {}, None},
"ElementType" -> "Integer64"]], "MinimumTimeIncrement" -> 1, "Caller" -> EventSeries]],
TabularColumn[Association["Data" -> {{-0.5543962648077652, 0.5825310698198298,
0.043602941865214184, 0.984529483672107, -0.0718708433783739}, {}, None},
"ElementType" -> "Real64"]], Association[]];TimeSeriesResample[es, 1 / 2]Normal[%]For TimeSeries, the default ResamplingMethod is linear interpolation:
ts = TimeSeries[{{1, 10}, {2, 20}, {3, 30}, {4, 40}, {5, 50}}]TimeSeriesResample[ts, 1 / 2]Normal[%]Possible Issues (2)
If the resampling method specification is invalid, the Automatic value will be used:
TimeSeries[{1, 2, 3}, ResamplingMethod -> foo]%["ResamplingType"]For TemporalData:
TemporalData[{1, 2, 3}, ResamplingMethod -> foo]%["ResamplingType"]TimeSeries does not allow None as a specification for ResamplingMethod and uses the default method:
ts = TimeSeries[{1, 2, 3}, ResamplingMethod -> None]ts["ResamplingType"]ts[.5]To still have Missing between the timestamps, use it as the constant value specification:
ts1 = TimeSeries[{1, 2, 3}, ResamplingMethod -> {"Constant", Missing[]}];ts1["ResamplingType"]ts1[.5]Related Guides
Text
Wolfram Research (2014), ResamplingMethod, Wolfram Language function, https://reference.wolfram.com/language/ref/ResamplingMethod.html (updated 2026).
CMS
Wolfram Language. 2014. "ResamplingMethod." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2026. https://reference.wolfram.com/language/ref/ResamplingMethod.html.
APA
Wolfram Language. (2014). ResamplingMethod. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ResamplingMethod.html
BibTeX
@misc{reference.wolfram_2026_resamplingmethod, author="Wolfram Research", title="{ResamplingMethod}", year="2026", howpublished="\url{https://reference.wolfram.com/language/ref/ResamplingMethod.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_resamplingmethod, organization={Wolfram Research}, title={ResamplingMethod}, year={2026}, url={https://reference.wolfram.com/language/ref/ResamplingMethod.html}, note=[Accessed: 12-June-2026]}