View License

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

» Watch video

Highlights from
Detrended Fluctuation Analysis

3.4 | 8 ratings Rate this file 58 Downloads (last 30 days) File Size: 506 KB File ID: #19795 Version: 1.1

Detrended Fluctuation Analysis


Guan Wenye (view profile)


02 May 2008 (Updated )

Detrended Fluctuation Analysis,fractal analysis

| Watch this File

File Information

it is consitent with the program provided by Oxford Univ
Interest readers can visit that page
and download a complied DFA program that runs much faster.

In stochastic processes, chaos theory and time series analysis, detrended fluctuation analysis (DFA) is a method for determining the statistical self-affinity of a signal. It is useful for analysing time series that appear to be long-memory processes.
Reference: Peng C-K, Havlin S, Stanley HE, Goldberger AL. Quantification of scaling exponents and crossover phenomena in nonstationary heartbeat time series. Chaos 1995;5:82-87.

MATLAB release MATLAB 7.1.0 (R14SP3)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (19)
29 Aug 2016 uday

uday (view profile)

How can I implement two dimensional DFA using this code. Thank you

Comment only
07 Feb 2014 Laya Das

How can one obtain the distribution of the scaling exponent obtained from DFA? How to obtain the standard deviation (that I have seen in many papers employing DFA) of the estimate?

Comment only
10 Apr 2013 Ali

Ali (view profile)

Dear Guan,

Thank your for the program.
Can you please tell me what is the Alpha value for the DATA1 that exists in the download submission?

Comment only
06 Sep 2011 wang hongwu

Dear Guan
do you have the MF_DFA code?

06 Apr 2011 dayananda sagar

Dear Guan
i have a signal of 700 points,what necessary changes should i make in the program..pls reply soon..

Comment only
16 Feb 2011 Sarath Babu Krishna Murthy

Dear Guan,

Please let me know if I can have the input as row vector? I am having time series of different length and when I run, I am getting values more than 1.Do I need to change the value of n accordingly?

03 Feb 2010 Erika Rodriguez

Dear Guan Weye;
There is sample frequency that works better with DFA?

02 Feb 2010 Erika Rodriguez

02 Feb 2010 Erika Rodriguez

Dear Guan Wenye;
Thanks for you answer. I do have time series of diferent lengths. However, I find cross-overs. I am not sure whether I should take just one cross-over, the one that has the best fit for all the experiments. In other words, I am taking just boxes size up to 200ms. thanks Erika

Comment only
30 Jan 2010 Guan Wenye

Guan Wenye (view profile)

To Erika Rodriguez :
you can use time series of different lengths if the length is long enough to have statistical value.

25 Jan 2010 Erika Rodriguez

Dear Guan;
I should use the same size of n (n<=10,000) if I am comparing the DFA values in different types of lesions in spinal cord.

23 Nov 2009 Jefferson Willes

Dear Guan, the function output "function output1 = DFA (DATA, win_length, order)" with which data have to enter: DATE, win_length, order??

Comment only
15 Jul 2009 Andy Daubenspeck

The file dfm.m seems to be truncated at 26 lines leaving the for-loop unfinished.

Comment only
05 Jun 2009 Guan Wenye

Guan Wenye (view profile)

hi meysam abed
it is consitent with the program provided by oxford univ
i have checked with it

27 May 2009 meysam abed

dear Guan have you checked your DFA code with the code in and it's sample data with results???

01 May 2009 Guan Wenye

Guan Wenye (view profile)

to mehak gandhi :it would definitely runs faster if you code it in C or Fortran

Comment only
10 Nov 2008 mehak gandhi

is the program supposed to run slow

Comment only
14 Jul 2008 Guan Wenye

For fewer points, you may get incorrect result :).

Comment only
13 Jul 2008 Srav U

this may be a stupid question...but why do you need a minimum of 2000 data points?

Comment only
26 Nov 2011 1.1

add some description

Contact us