I have managed to confuse myself about the periods of discretised time series. It is all rather embarrassing.

This is one period extracted from my continuous signal (radians on y, time on x):

enter image description here

To use it in my calculations I use a discretised vector of N points. The above signal has a period of $T=0.95s$. The discretised version A has $N=100$ and the angle, over time, is indexed from 1 to 100.

Q1: is the period of my angle vector $[\theta_1,\ldots,\theta_{100}]$; $T=100$?

Now suppose I need to standardise my data as such, incl the index:

% standardise training inputs
m = mean(A);
s = std(A);
x(:,1) = 1/s(2) * (A(:,2) - m(2));  % index
x(:,2) = 1/s(1) * (A(:,1) - m(1));  % velocity

Q2: Is the new period then simply max(x(:,1))?

  • $\begingroup$ Are you proposing to "standardize" your time basis?! That doesn't make sense for a periodic time basis. $\endgroup$
    – MSalters
    Jan 23, 2017 at 22:42
  • 2
    $\begingroup$ Most discrete signal analysis ignores the sampling interval once converted. By that I mean that your indices are 1, 2, 3, ..., 100, so your period would be 100 in discrete time. You would normally denote this as N=100. It looks like your indices got mixed up in Q2. Anyway, you would not normally compute the mean and standard deviation of an independent variable. You should just index it with 1, 2, 3, ..., 100. $\endgroup$ Jan 24, 2017 at 3:25
  • $\begingroup$ @Commodore63 thank you that clarified things; I am using this with Gaussian processes which is why I need to standardise my data. $\endgroup$
    – Astrid
    Jan 24, 2017 at 21:11

1 Answer 1


On the continuous setting, the period is the minimum $T\ne 0$ such that $\theta(t+T)=\theta(t)$. Once you decide to have $N$ regularly sampled points inside a period, you introduce a sampling period $T_N$ that is directly proportional to the period: $T_N=T/N$. Hence, you can describe your period as a quantity with a time unit (second) or as a unitless number of samples, equivalently.

Now, if for some reason you normalize the time axis with an affine function, the mean will only shift the whole axis (no change for the period), and the scaling only will dilate or shrink the interval between samples.

So here, the effect of $s(1)$ will turn $T_N$ into $T_N/s(1)$, and also $T$ into $T/s(1)$.

In your case, you can directly compute $s(1)=T_N\sqrt{\frac{N(N+1)}{12}}$. In this formula, the scale factor depends on $N$ only, and not on the start and end indices. For $N=100$, the new period should be now a unitless quantity of $$T/s(1) = \sqrt{\frac{12N}{N+1}}\,.$$

  • $\begingroup$ That was surprisingly harder than I thought. $\endgroup$
    – Astrid
    Jan 26, 2017 at 7:48
  • $\begingroup$ I will provide more details later. Beware though, there is apparently a swap of indices between your 'x(:,1)' and 'x(:,2)' $\endgroup$ Jan 26, 2017 at 8:34
  • $\begingroup$ Also, what is s(1) in your above notation? $\endgroup$
    – Astrid
    Jan 26, 2017 at 10:54
  • $\begingroup$ I took $s(1)$ as the 'std' in the dimension of the time index. I am surprised by your notation $x(:,1) = 1/s(2)\ldots $ and $x(:,2) = 1/s(1)\ldots $ $\endgroup$ Jan 26, 2017 at 10:58
  • $\begingroup$ Aha, sorry, yes that is obvious now. Yeah I have a lot of datastreams and I am storing the std in s and treating it as a vector. Matlab makes that easy after all. $\endgroup$
    – Astrid
    Jan 26, 2017 at 11:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.