What start time is assumed in Matlab's resample function?

When I use Matlab's resample function, what start time is assumed for the resampled time vector? All the plots and examples in the documentation seem to show the resampled time vector starting at the same initial time as the original vector, i.e. they both start at t=0. Is this correct?

1 Kommentar

KAE
KAE am 17 Feb. 2017
Bearbeitet: KAE am 17 Feb. 2017
I am padding my time series at both ends to move end effects away from the "real" data, and the results do indicate that the first time sample of the resampled data is the same as the first time sample of the original data. But I'd love "official" confirmation of this.

Melden Sie sich an, um zu kommentieren.

 Akzeptierte Antwort

Greg Dionne
Greg Dionne am 28 Feb. 2017

0 Stimmen

All except for the datetime object variant (where the first sample datetime is copied to the output).

4 Kommentare

Can you please explain your answer (all what)? Sorry to be missing it, and thanks for your answer.
For the later versions of MATLAB, if you supply a time argument you can resample (weakly) non-uniform signals. It will align the time samples accordingly if you say [Y,Ty] = RESAMPLE(X, Tx, ...). Tx can be a vector of doubles, durations, or datetimes. See the second example in the help for an example of this usage.
KAE
KAE am 13 Mär. 2017
I think you are referring to the example here called 'Resample a Nonuniformly Sampled Data Set', so my interpretation of your answer to the title question is: "When you resample, the first element of the time vector is indeed the same as the first element of the initial time vector, unless you specify the output times." Did I interpret your answer correctly? Sorry to come back with all these clarification requests.
That seems right to me. BTW, if you ever need get clarification or give feedback on the doc page from the MathWorks you can click on that "Was this topic helpful?" on the lower right portion of the doc page.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Tags

Gefragt:

KAE
am 16 Feb. 2017

Kommentiert:

am 16 Mär. 2017

Community Treasure Hunt

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

Start Hunting!

Translated by