({{, (RefLink[ResamplingMethod, paclet:ref/ResamplingMethod]) 
is an option for functions such as (RefLink[TemporalData, paclet:ref/TemporalData]) and (RefLink[MovingMap, paclet:ref/MovingMap]) that specifies how values in between given times should be computed.}})

OpenersNotesSection(Spacer1)Details

Typical settings include:

OpenersPrimaryExamplesSection(Spacer1)Examples  (4)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

Treat values in between given times as (RefLink[Missing, paclet:ref/Missing]):

s={(Subscript[x, 1]),(Subscript[x, 2]),(Subscript[x, 3]),(Subscript[x, 4])};
t={2,4,6,8};

td1=TemporalData[s,{t},ResamplingMethod->None];

td1["PathFunction"][Range[2,8]]

Use a constant value c:

td2=TemporalData[s,{t},ResamplingMethod->{"Constant",c}];

td2["PathFunction"][Range[2,8]]

Use first-order interpolation:

td3=TemporalData[s,{t},ResamplingMethod->{"Interpolation",InterpolationOrder->1}];

td3["PathFunction"][Range[2,8]]

OpenersExampleSection1(Spacer1)Scope  (1)

(RefLink[ResamplingMethod, paclet:ref/ResamplingMethod]) specifies how to upsample a (RefLink[TimeSeries, paclet:ref/TimeSeries]):

ts=TimeSeries[];

ts["Path"]

Resample with a step of 1/2 with interpolation of order 1:

ts1=TimeSeriesResample[ts,1/2,ResamplingMethod->{"Interpolation",InterpolationOrder->1}]

Use interpolation of order 2:

ts2=TimeSeriesResample[ts,1/2,ResamplingMethod->{"Interpolation",InterpolationOrder->2}]

Compare the plots:

Show[ListPlot[ts,PlotStyle->PointSize[.05]],ListLinePlot[{ts1,ts2}]]

Use no interpolation:

ts3=TimeSeriesResample[ts,1/2,ResamplingMethod->None]

ts3["Path"]

OpenersExampleSection3(Spacer1)Properties & Relations  (2)

For (RefLink[EventSeries, paclet:ref/EventSeries]), the default (RefLink[ResamplingMethod, paclet:ref/ResamplingMethod]) is (RefLink[None, paclet:ref/None]):

es=EventSeries[];

es1=TimeSeriesResample[es,1/2];
es2=TimeSeriesResample[es,1/2,ResamplingMethod->None];

es1["Path"]==es2["Path"]

For (RefLink[TimeSeries, paclet:ref/TimeSeries]), the default (RefLink[ResamplingMethod, paclet:ref/ResamplingMethod]) is an interpolation with order 1:

ts=TimeSeries[];

ts1=TimeSeriesResample[ts,1/2];

ts2=TimeSeriesResample[ts,1/2,ResamplingMethod->{"Interpolation",InterpolationOrder->1}];

The results are the same:

ts1["Path"]==ts2["Path"]

Resampling method can be changed either by creating a new time series or by an option to (RefLink[TimeSeriesResample, paclet:ref/TimeSeriesResample]):

newts=TimeSeries[ts,ResamplingMethod->0];
ts3=TimeSeriesResample[newts,1/2];

ts4=TimeSeriesResample[ts,1/2,ResamplingMethod->0];

The results are the same:

ts4["Path"]==ts3["Path"]

Compare the time series:

ListPlot[{ts,ts1,ts3},Filling->{1->Axis},Joined->{False,True,True}]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[TimeSeriesResample, paclet:ref/TimeSeriesResample])  ▪  (RefLink[TimeSeriesThread, paclet:ref/TimeSeriesThread])  ▪  (RefLink[TimeSeriesInsert, paclet:ref/TimeSeriesInsert])  ▪  (RefLink[TimeSeriesWindow, paclet:ref/TimeSeriesWindow])  ▪  (RefLink[TemporalData, paclet:ref/TemporalData])  ▪  (RefLink[TimeSeries, paclet:ref/TimeSeries])  ▪  (RefLink[EventSeries, paclet:ref/EventSeries])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Time Series Processing, paclet:guide/TimeSeries])}})}})