"How periodic" is a question that cannot be answered:
either a signal IS periodic (even if overlaid with a lot of noise) - then there is a number of mathematical procedures to find the period. Repeatedly applying these procedures over time will show whether the period is constant or 'random' - a case where I would not consider it periodic in the basic sense.
or the signal IS not periodic. In this case the mathematical procedures will find frequencies as well (they always find frequencies), but the properties of the spectrum will be significantly different. Eg. the maximum power frequency will be higher than anything meaningful. Or quite a number of frequencies have roundabout the same amplitude.
Some afterthought to Dr. Schlindwein's contribution: it is possible to extract some 'object' (= a sequence of consecutive values) from a signal to perform an ACF. You have to put some prior knowledge into the search for such a sequence, but it is really possible. I've once implemented such an "automatic object extraction" for ACF/CCF (as for Cross Correlation Function) before.
And it should be clear that the correlation function will 'lock' at a random repetition of the basic period - depending on the individual implementation of the correlation function. But 'one' can do such things.
Coming back to my intro: it might help if you gave away what you try to achieve. Maybe there is a better way than searching for 'periodicity' :)
The periodic signal is defined as the signal that repeats itself periodically in the time domain. So firstly define the behavior of the signal on the time domain for a certain period and follow up its behavior to see it is repetitive or not. If it is repetitive so the signal is periodic and you can find its spectrum on the frequency domain using the Fourier series otherwise it is a periodic and you use the Fourier transform to find its spectrum.
You have different approximation methods to 'estimate' the fundamental period/frequency of a signal. As commented before, you can use a frequency domain analysis, as the Discrete Fourier Transform (DFT) / computing the periodogram of a signal and you can find the periodicity using the autocorrelation (cross-product measures similarity across time). I attach you some links with examples of the implementation of both methods in Matlab and a presentation of J.P. Bello with different approaches regarding with your issue thought aimed with an acoustic approximation.
The frequency spectrum of a signal is the Fourier Transform of the autocorrelation function. The problems are (i) you don't have the autocorrelation function, so you have to estimate it from the data you have; (ii) to estimate the ACF you need a signal with infinite duration, which, again, you don't have, so you have to make do with what you have. See the links that Martín Martínez Villar made available to you and study spectral estimation.
Is auto correlation function gives similarities or periodic in terms of time duration if it is continuous signals, number of samples if it is discrete signals?
"How periodic" is a question that cannot be answered:
either a signal IS periodic (even if overlaid with a lot of noise) - then there is a number of mathematical procedures to find the period. Repeatedly applying these procedures over time will show whether the period is constant or 'random' - a case where I would not consider it periodic in the basic sense.
or the signal IS not periodic. In this case the mathematical procedures will find frequencies as well (they always find frequencies), but the properties of the spectrum will be significantly different. Eg. the maximum power frequency will be higher than anything meaningful. Or quite a number of frequencies have roundabout the same amplitude.
Some afterthought to Dr. Schlindwein's contribution: it is possible to extract some 'object' (= a sequence of consecutive values) from a signal to perform an ACF. You have to put some prior knowledge into the search for such a sequence, but it is really possible. I've once implemented such an "automatic object extraction" for ACF/CCF (as for Cross Correlation Function) before.
And it should be clear that the correlation function will 'lock' at a random repetition of the basic period - depending on the individual implementation of the correlation function. But 'one' can do such things.
Coming back to my intro: it might help if you gave away what you try to achieve. Maybe there is a better way than searching for 'periodicity' :)
Is your signal noisy? if it is not noisy, you may measure the distance of zero-crossing points and try to find the repeat one. It noisy, FFT may be a method to find a peak in spectrum.
are you looking for the bi-spectrum? as in if you took the frequency of the frequency, you'd get an idea of cyclic elements of the signal repetition? as a thought exercise, this would something like a 1 Mhz signal that impulsed for half a second with a 1 second break. then the 1Mhz signal would have a 1hz observable tone along your STFT.
The most generalized way of measuring periodicity of a signal is to take it's Fourier transform, use it to get a power density distribution, then normalize this distribution to obtain something like a probability distribution function over the frequencies and then calculate this pdf's entropy. Entropy is a measure of uncertainty, the more uncertainty in the signal's frequency distribution, the more aperiodic it should be.