There is a newer version that calculates normal, overlapping, modified and times Allan deviations in one function: http://www.mathworks.com/matlabcentral/fileexchange/26659-allan-v3-0
allan.m calculates the Allan deviation of a time domain signal. It is intended for stability analysis of frequency data. Data sets with rate or time stamp information are handled.
Enhanced performance for rate in comparison to allan.m v1.61 (by M.A. Hopcroft, file ID 13246) by preallocating memory space. No changes for time stamp.
For long time series, the enhancement gets more significant.
Motivation: Calculate Allan variance for long time series with high sample rates.
Sample data available at www.nbi.dk/~czerwin/files/allan.zip
Comments by John D'Errico (Oct 14, 2008) are incorporated.
This short script is very useful for analyzing noise like vibrations, long time drifts etc. It is easy to use and is relatively fast.
Does this calculate the overlapping ADEV? It looks like it doesn't - perhaps modifying it to calculate overlapping ADEV - the standard ADEV is considered about 20 yrs out of date.... just a thought.
Pretty good help. Complete. References. Descriptions of the arguments. A complete revision history. Lots of meaningful internal comments.
A few points that the author should consider repairing:
Swap the first two lines of the help. The lookfor utility uses the very FIRST line of the help. But as it is in this code, lookfor will fail to find anything of value.
% [RETVAL, S, ERRORB] = ALLAN(DATA,TAU,NAME)
% Compute the Allan deviation for a set of time-domain frequency data
Swap those two lines, and lookfor will be properly enabled. As well, if you use help on a directory name that contains this file, then it too uses the H1 line.
I'd also recommend that the author should use mlint. Mlint found multiple lines where variables are created yet never used in the code. Also, variables are dynamically grown with no use of preallocation. Also, there is no need for a return statement at the end of a function.
One problem that seemed more serious. I tested the author's example, but it fails with a semilogy error.
??? Error using ==> semilogx
Vectors must be the same lengths.
Error in ==> allan at 359
I'm hoping the author will fix the bug and swap the first two comment lines to repair the H1 line, so I'll hold off on any numerical rating until he does at least these things.
There is a newer version that calculates normal, overlapping, modified and times Allan deviations: http://www.mathworks.com/matlabcentral/fileexchange/26659-allan-v3-0