[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: need to calculate autocorrelation length of a matrix
From: |
Matt Foster |
Subject: |
Re: need to calculate autocorrelation length of a matrix |
Date: |
Thu, 26 Jun 2008 14:21:37 +0100 |
On Wed, Jun 18, 2008 at 12:05 AM, chaski <address@hidden> wrote:
>
> Working with a n x n matrix of non-negative real values, I'm trying to
> calculate a 2d analog of 'autocorrelation length' -- that is, I want to find
> the minimum euclidean (or similar) distance at which, on average, two
> entries in the matrix (separated by that critical distance) will show a
> mutual correlation of less than 1/e (or 1/2, or some other such 'natural'
> threshold).
>
> Analogous measures are used as metrics of landscape 'ruggedness' or
> 'roughness', I think, but I've looked in vain for an established method to
> calculate them. Does anyone know of a script that could (perhaps with
> tweaking at my novice level) be used to do so?
>
I did a quick google, and found this:
http://scien.stanford.edu/class/psych221/projects/00/jichien/matlab/AutoCorr2.m
Which you might be able to adapt to your needs.
I've also attached a couple of functions that I wrote a while ago, and
which might be useful.
I've not ever used them in anger, but the algorithm is from a
textbook, and they give the same results as the example in the book.
Cheers,
Matt
--
Matt Foster | http://my-mili.eu/matt
acf_alt.m
Description: Binary data
acf.m
Description: Binary data