View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
allan v1.71

4.0 | 1 rating Rate this file 18 Downloads (last 30 days) File Size: 5.79 KB File ID: #21727 Version: 1.3
image thumbnail

allan v1.71



13 Oct 2008 (Updated )

Calculates Allan deviation of a time domain signal.

| Watch this File

File Information

There is a newer version that calculates normal, overlapping, modified and times Allan deviations in one function:

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

Comments by John D'Errico (Oct 14, 2008) are incorporated.


Allan inspired this file.

MATLAB release MATLAB 7.6 (R2008a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (3)
10 Jun 2009 Magnus Andersson

This short script is very useful for analyzing noise like vibrations, long time drifts etc. It is easy to use and is relatively fast.

04 Jun 2009 Danny Rogers

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.

Comment only
13 Oct 2008 John D'Errico

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.

% 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.

Comment only
12 Feb 2010 1.3

There is a newer version that calculates normal, overlapping, modified and times Allan deviations:

Contact us